aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/back_end.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-02-20 10:48:22 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2015-02-20 10:48:22 +0100
commit17ce1f52fe78bfdc63dfe941a272a1ffdea605a7 (patch)
treec48f5ec002d929397a7d3b385e81dff00a2940cc /gcc/ada/back_end.adb
parentcf27c5a2bcf21d320a6d82de255f01e43a17a473 (diff)
downloadgcc-17ce1f52fe78bfdc63dfe941a272a1ffdea605a7.zip
gcc-17ce1f52fe78bfdc63dfe941a272a1ffdea605a7.tar.gz
gcc-17ce1f52fe78bfdc63dfe941a272a1ffdea605a7.tar.bz2
[multiple changes]
2015-02-20 Eric Botcazou <ebotcazou@adacore.com> * sinfo.ads: Add comment. 2015-02-20 Olivier Hainque <hainque@adacore.com> * 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
Diffstat (limited to 'gcc/ada/back_end.adb')
-rw-r--r--gcc/ada/back_end.adb11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ada/back_end.adb b/gcc/ada/back_end.adb
index adba33e..7768687 100644
--- a/gcc/ada/back_end.adb
+++ b/gcc/ada/back_end.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- 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- --
@@ -23,6 +23,8 @@
-- --
------------------------------------------------------------------------------
+-- This is the version of the Back_End package for GCC back ends
+
with Atree; use Atree;
with Debug; use Debug;
with Elists; use Elists;
@@ -251,11 +253,12 @@ package body Back_End is
else
Store_Compilation_Switch (Switch_Chars);
- -- Back end switch -fno-inline also sets the Suppress_All_Inlining
- -- front end flag to entirely inhibit all inlining.
+ -- For gcc back ends, -fno-inline disables Inline pragmas only,
+ -- not Inline_Always to remain consistent with the always_inline
+ -- attribute behavior.
if Switch_Chars (First .. Last) = "fno-inline" then
- Opt.Suppress_All_Inlining := True;
+ Opt.Disable_FE_Inline := True;
-- Back end switch -fpreserve-control-flow also sets the front end
-- flag that inhibits improper control flow transformations.