mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 09:09:30 +02:00
+ new pio_inline_forbidden flag to indicate that while parsing the
implementation the compiler determined the routine must never be inlined o difference with po_noinline: can also be set in the implementation o difference with pio_inline_not_possible: it indicates that e.g. LLVM must not inline the routine either git-svn-id: trunk@44065 -
This commit is contained in:
parent
b625afe800
commit
254b85c352
@ -1010,7 +1010,8 @@ implementation
|
||||
writer.AsmWrite(' returns_twice');
|
||||
if po_inline in pd.procoptions then
|
||||
writer.AsmWrite(' inlinehint');
|
||||
if po_noinline in pd.procoptions then
|
||||
if (po_noinline in pd.procoptions) or
|
||||
(pio_inline_forbidden in pd.implprocoptions) then
|
||||
writer.AsmWrite(' noinline');
|
||||
{ ensure that functions that happen to have the same name as a
|
||||
standard C library function, but which are implemented in Pascal,
|
||||
|
@ -211,6 +211,9 @@ implementation
|
||||
if pi_uses_get_frame in current_procinfo.flags then
|
||||
begin
|
||||
_no_inline('get_frame');
|
||||
{ for LLVM: it can inline things that FPC can't, but it mustn't
|
||||
inline this one }
|
||||
include(current_procinfo.procdef.implprocoptions,pio_inline_forbidden);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
@ -442,7 +442,9 @@ type
|
||||
{ a stub/thunk }
|
||||
pio_thunk,
|
||||
{ compiled with fastmath enabled }
|
||||
pio_fastmath
|
||||
pio_fastmath,
|
||||
{ inline is forbidden (calls get_frame) }
|
||||
pio_inline_forbidden
|
||||
);
|
||||
timplprocoptions = set of timplprocoption;
|
||||
|
||||
|
@ -3218,7 +3218,8 @@ const
|
||||
(mask:pio_inline_not_possible; str:'InlineNotPossible'),
|
||||
(mask:pio_nested_access; str:'NestedAccess'),
|
||||
(mask:pio_thunk; str:'Thunk'),
|
||||
(mask:pio_fastmath; str:'FastMath')
|
||||
(mask:pio_fastmath; str:'FastMath'),
|
||||
(mask:pio_inline_forbidden; str:'InlineForbidden')
|
||||
);
|
||||
var
|
||||
i: timplprocoption;
|
||||
|
Loading…
Reference in New Issue
Block a user