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/sinfo.ads | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sinfo.ads') diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 7c4bbf9..3dc9311 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- 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- -- @@ -6522,6 +6522,14 @@ package Sinfo is -- a cleanup procedure that must handle declarations as well as the -- statements of a block. + -- Note: the cleanup_procedure_call does not go through the common + -- processing for calls, which in particular means that it will not be + -- automatically inlined in all cases, even though the procedure to be + -- called is marked inline. More specifically, if the procedure comes + -- from another unit than the main source unit, for example a run-time + -- unit, then it needs to be manually added to the list of bodies to be + -- inlined by invoking Add_Inlined_Body on it. + -- N_Handled_Sequence_Of_Statements -- Sloc points to first token of first statement -- Statements (List3) -- cgit v1.1