From: Eric Botcazou Date: Sat, 9 Sep 2017 12:45:45 +0000 (+0000) Subject: trans.c (Subprogram_Body_to_gnu): Disregard inlining limits for expression functions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d25b3ba49e73ea62920786f1785db6cfc4daa85;p=gcc.git trans.c (Subprogram_Body_to_gnu): Disregard inlining limits for expression functions. * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining limits for expression functions. (gnat_to_gnu) : Fix formatting. From-SVN: r251935 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f02fde23860..804a79e1c1b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2017-09-09 Eric Botcazou + + * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining + limits for expression functions. + (gnat_to_gnu) : Fix formatting. + 2017-09-09 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Copy the diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 2f7d497b11b..4536a76e6ac 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -3777,6 +3777,11 @@ Subprogram_Body_to_gnu (Node_Id gnat_node) Sloc_to_locus (Sloc (gnat_node), &locus); DECL_SOURCE_LOCATION (gnu_subprog_decl) = locus; + /* If the body comes from an expression function, arrange it to be inlined + in almost all cases. */ + if (Was_Expression_Function (gnat_node)) + DECL_DISREGARD_INLINE_LIMITS (gnu_subprog_decl) = 1; + /* Initialize the information structure for the function. */ allocate_struct_function (gnu_subprog_decl, false); gnu_subprog_language = ggc_cleared_alloc (); @@ -6140,7 +6145,7 @@ gnat_to_gnu (Node_Id gnat_node) && (((Is_Array_Type (Etype (gnat_temp)) || Is_Record_Type (Etype (gnat_temp))) && !Is_Constrained (Etype (gnat_temp))) - || Is_Concurrent_Type (Etype (gnat_temp)))) + || Is_Concurrent_Type (Etype (gnat_temp)))) break; if (Present (Expression (gnat_node))