diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-31 12:51:34 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-31 12:51:34 +0000 |
commit | 9fac98bb6eea8fc6f63a1e68aecadb1b1418c7fa (patch) | |
tree | 22a06ca7e0f64d9f875617f4a6913429cf2785ab /gcc/ada/exp_ch6.adb | |
parent | 218006686dcca9bfba64e9dcf7aa6f109b57efeb (diff) | |
download | gcc-9fac98bb6eea8fc6f63a1e68aecadb1b1418c7fa.tar.gz |
2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Is_Effectively_Volatile): New routine.
2014-07-31 Fedor Rybin <frybin@adacore.com>
* gnat_ugn.texi: Document --test-duration option for gnattest.
2014-07-31 Javier Miranda <miranda@adacore.com>
* opt.ads (Back_End_Inlining): New variable which controls
activation of inlining by back-end expansion.
* gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
the body to be inlined by the frontend if Back_End_Inlining
is enabled.
* exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
(Expand_Call): If backend inlining is enabled let the backend to
handle inlined subprograms.
* inline.ads (Register_Backend_Call): Moved here from exp_ch6
* inline.adb (Register_Backend_Call): Moved here from exp_ch6.
(Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
(Must_Inline): Do not return Inline_Call if Back_End_Inlining is
enabled.
* debug.adb Document -gnatd.z
* fe.h Import Back_End_Inlining variable.
* gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
enabled then declare attribute "always inline"
2014-07-31 Robert Dewar <dewar@adacore.com>
* a-ngelfu.ads: Minor comment fix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213353 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r-- | gcc/ada/exp_ch6.adb | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 45327b96a72..87a4ccbfa03 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -2113,9 +2113,6 @@ package body Exp_Ch6 is -- then register the enclosing unit of Subp to Inlined_Bodies so that -- the body of Subp can be retrieved and analyzed by the backend. - procedure Register_Backend_Call (N : Node_Id); - -- Append N to the list Backend_Calls - ----------------------- -- Do_Backend_Inline -- ----------------------- @@ -2174,19 +2171,6 @@ package body Exp_Ch6 is end if; end Do_Backend_Inline; - --------------------------- - -- Register_Backend_Call -- - --------------------------- - - procedure Register_Backend_Call (N : Node_Id) is - begin - if Backend_Calls = No_Elist then - Backend_Calls := New_Elmt_List; - end if; - - Append_Elmt (N, To => Backend_Calls); - end Register_Backend_Call; - -- Start of processing for Do_Inline begin @@ -3846,9 +3830,17 @@ package body Exp_Ch6 is return; end if; + -- Back end inlining: let the back end handle it + + if Back_End_Inlining + and then Is_Inlined (Subp) + then + Add_Inlined_Body (Subp); + Register_Backend_Call (Call_Node); + -- Handle inlining (old semantics) - if Is_Inlined (Subp) and then not Debug_Flag_Dot_K then + elsif Is_Inlined (Subp) and then not Debug_Flag_Dot_K then Inlined_Subprogram : declare Bod : Node_Id; Must_Inline : Boolean := False; |