From 17ce1f52fe78bfdc63dfe941a272a1ffdea605a7 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 20 Feb 2015 10:48:22 +0100 Subject: [multiple changes] 2015-02-20 Eric Botcazou * sinfo.ads: Add comment. 2015-02-20 Olivier Hainque * opt.ads: Replace Opt.Suppress_All_Inlining by two separate flags controlling the actual FE inlining out of pragma Inline and pragma Inline_Always. * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True on -fno-inline, which disables all inlining in compilers with an Ada back-end and without back-end inlining support. * back_end.adb (Scan_Back_End_Switches): Set the Inline related flag to True on -fno-inline and leave Inline_Always alone for gcc back-ends. * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the names of the Opt flags it sets. * gnat1drv.adb (Adjust_Global_Switches): Remove test on Opt.Suppress_All_Inlining in the Back_End_Inlining computation. * sem_prag.adb (Make_Inline): Remove early return conditioned on Opt.Suppress_All_Inlining. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to disable the calls to Build_Body_To_Inline otherwise triggered by pragma Inline or Inline_Always. This will prevent actual front-end inlining of the subprogram on calls. From-SVN: r220842 --- gcc/ada/adabkend.adb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/ada/adabkend.adb') diff --git a/gcc/ada/adabkend.adb b/gcc/ada/adabkend.adb index 1a42000..5bf4f74 100644 --- a/gcc/ada/adabkend.adb +++ b/gcc/ada/adabkend.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2014, AdaCore -- +-- Copyright (C) 2001-2015, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -178,12 +178,13 @@ package body Adabkend is return; -- Special check, the back end switch -fno-inline also sets the - -- front end flag to entirely inhibit all inlining. So we store it - -- and set the appropriate flag. + -- front end flags to entirely inhibit all inlining. So we store it + -- and set the appropriate flags. elsif Switch_Chars (First .. Last) = "fno-inline" then Lib.Store_Compilation_Switch (Switch_Chars); - Opt.Suppress_All_Inlining := True; + Opt.Disable_FE_Inline := True; + Opt.Disable_FE_Inline_Always := True; return; -- Similar processing for -fpreserve-control-flow -- cgit v1.1