mirror of git://gcc.gnu.org/git/gcc.git
sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets use frontend inlining at all optimization levels.
2012-03-09 Javier Miranda <miranda@adacore.com> * sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets use frontend inlining at all optimization levels. * sem_util.adb (Must_Inline): In AAMP and VM targets, given that there is no inlining support in the backend, use also frontend inlining when compiling with optimizations enabled. * exp_ch6.adb (Expand_Call): Minor code reorganization. From-SVN: r185140
This commit is contained in:
parent
30da483da3
commit
ea3a4ad0a3
|
@ -1,3 +1,12 @@
|
||||||
|
2012-03-09 Javier Miranda <miranda@adacore.com>
|
||||||
|
|
||||||
|
* sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets
|
||||||
|
use frontend inlining at all optimization levels.
|
||||||
|
* sem_util.adb (Must_Inline): In AAMP and VM targets, given that
|
||||||
|
there is no inlining support in the backend, use also frontend
|
||||||
|
inlining when compiling with optimizations enabled.
|
||||||
|
* exp_ch6.adb (Expand_Call): Minor code reorganization.
|
||||||
|
|
||||||
2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
|
2012-03-09 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gcc-interface/ada-tree.h (TYPE_VAX_FLOATING_POINT_P): Move around.
|
* gcc-interface/ada-tree.h (TYPE_VAX_FLOATING_POINT_P): Move around.
|
||||||
|
@ -504,7 +513,6 @@
|
||||||
can happen in an instantiation in programs that run afoul or
|
can happen in an instantiation in programs that run afoul or
|
||||||
AI05-0087.
|
AI05-0087.
|
||||||
|
|
||||||
|
|
||||||
2012-02-17 Ed Schonberg <schonberg@adacore.com>
|
2012-02-17 Ed Schonberg <schonberg@adacore.com>
|
||||||
|
|
||||||
* exp_ch6.adb (Legal_Copy): If layout is not
|
* exp_ch6.adb (Legal_Copy): If layout is not
|
||||||
|
|
|
@ -3790,10 +3790,7 @@ package body Exp_Ch6 is
|
||||||
Spec : constant Node_Id := Unit_Declaration_Node (Subp);
|
Spec : constant Node_Id := Unit_Declaration_Node (Subp);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Optimization_Level > 0 then
|
if Must_Inline (Subp) then
|
||||||
Do_Inline (Subp, Orig_Subp);
|
|
||||||
|
|
||||||
elsif Must_Inline (Subp) then
|
|
||||||
if In_Extended_Main_Code_Unit (Call_Node)
|
if In_Extended_Main_Code_Unit (Call_Node)
|
||||||
and then In_Same_Extended_Unit (Sloc (Spec), Loc)
|
and then In_Same_Extended_Unit (Sloc (Spec), Loc)
|
||||||
and then not Has_Completion (Subp)
|
and then not Has_Completion (Subp)
|
||||||
|
@ -3805,6 +3802,9 @@ package body Exp_Ch6 is
|
||||||
else
|
else
|
||||||
Do_Inline_Always (Subp, Orig_Subp);
|
Do_Inline_Always (Subp, Orig_Subp);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
elsif Optimization_Level > 0 then
|
||||||
|
Do_Inline (Subp, Orig_Subp);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- The call may have been inlined or may have been passed to
|
-- The call may have been inlined or may have been passed to
|
||||||
|
|
|
@ -4888,9 +4888,13 @@ package body Sem_Ch6 is
|
||||||
Remove (Body_To_Analyze);
|
Remove (Body_To_Analyze);
|
||||||
|
|
||||||
-- Keep separate checks needed when compiling without optimizations
|
-- Keep separate checks needed when compiling without optimizations
|
||||||
|
-- AAMP and VM targets have no support for inlining in the backend
|
||||||
|
-- and hence we use frontend inlining at all optimization levels.
|
||||||
|
|
||||||
if Optimization_Level = 0 then
|
if Optimization_Level = 0
|
||||||
|
or else AAMP_On_Target
|
||||||
|
or else VM_Target /= No_VM
|
||||||
|
then
|
||||||
-- Cannot inline functions whose body has a call that returns an
|
-- Cannot inline functions whose body has a call that returns an
|
||||||
-- unconstrained type since the secondary stack is involved, and
|
-- unconstrained type since the secondary stack is involved, and
|
||||||
-- it is not worth inlining.
|
-- it is not worth inlining.
|
||||||
|
|
|
@ -9422,7 +9422,13 @@ package body Sem_Util is
|
||||||
|
|
||||||
function Must_Inline (Subp : Entity_Id) return Boolean is
|
function Must_Inline (Subp : Entity_Id) return Boolean is
|
||||||
begin
|
begin
|
||||||
return Optimization_Level = 0
|
-- AAMP and VM targets have no support for inlining in the backend.
|
||||||
|
-- Hence we do as much inlining as possible in the front end.
|
||||||
|
|
||||||
|
return
|
||||||
|
(Optimization_Level = 0
|
||||||
|
or else AAMP_On_Target
|
||||||
|
or else VM_Target /= No_VM)
|
||||||
and then Has_Pragma_Inline (Subp)
|
and then Has_Pragma_Inline (Subp)
|
||||||
and then (Has_Pragma_Inline_Always (Subp) or else Front_End_Inlining);
|
and then (Has_Pragma_Inline_Always (Subp) or else Front_End_Inlining);
|
||||||
end Must_Inline;
|
end Must_Inline;
|
||||||
|
|
Loading…
Reference in New Issue