aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-11-20 11:46:08 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-11-20 11:46:08 +0100
commit04e9213da79a04f1f87f1b15ed141a065b3d0185 (patch)
treee66f1a9b36e9aec397c157cffafca6655be5b276 /gcc
parent8a23b1006359c176dcc6cfd0a6a7cabcf58687c7 (diff)
downloadgcc-04e9213da79a04f1f87f1b15ed141a065b3d0185.zip
gcc-04e9213da79a04f1f87f1b15ed141a065b3d0185.tar.gz
gcc-04e9213da79a04f1f87f1b15ed141a065b3d0185.tar.bz2
[multiple changes]
2014-11-20 Eric Botcazou <ebotcazou@adacore.com> * inline.adb (Analyze_Inlined_Bodies): Iterate between loading of the inlined bodies and instantiation of the generic bodies until no more bodies need to be loaded. 2014-11-20 Vincent Celier <celier@adacore.com> * prj.adb, prj.ads, prj-conf.adb: Minor change of procedure name: Update_Ignore_Missing_With becomes Set_Ignore_Missing_With. From-SVN: r217831
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog11
-rw-r--r--gcc/ada/inline.adb19
-rw-r--r--gcc/ada/prj-conf.adb4
-rw-r--r--gcc/ada/prj.adb13
-rw-r--r--gcc/ada/prj.ads7
5 files changed, 36 insertions, 18 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 1dee651..610203b 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,14 @@
+2014-11-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * inline.adb (Analyze_Inlined_Bodies): Iterate between loading
+ of the inlined bodies and instantiation of the generic bodies
+ until no more bodies need to be loaded.
+
+2014-11-20 Vincent Celier <celier@adacore.com>
+
+ * prj.adb, prj.ads, prj-conf.adb: Minor change of procedure name:
+ Update_Ignore_Missing_With becomes Set_Ignore_Missing_With.
+
2014-11-20 Robert Dewar <dewar@adacore.com>
* exp_ch7.adb, sem_ch5.adb, sem_ch7.adb, sem_util.adb,
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 3bd9b93..13d0f91 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -774,15 +774,20 @@ package body Inline is
end if;
J := J + 1;
- end loop;
- -- The analysis of required bodies may have produced additional
- -- generic instantiations. To obtain further inlining, we perform
- -- another round of generic body instantiations. Establishing a
- -- fully recursive loop between inlining and generic instantiations
- -- is unlikely to yield more than this one additional pass.
+ if J > Inlined_Bodies.Last then
+
+ -- The analysis of required bodies may have produced additional
+ -- generic instantiations. To obtain further inlining, we need
+ -- to perform another round of generic body instantiations.
+
+ Instantiate_Bodies;
- Instantiate_Bodies;
+ -- Symmetrically, the instantiation of required generic bodies
+ -- may have caused additional bodies to be inlined. To obtain
+ -- further inlining, we keep looping over the inlined bodies.
+ end if;
+ end loop;
-- The list of inlined subprograms is an overestimate, because it
-- includes inlined functions called from functions that are compiled
diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb
index 623cf17..84c3dd6 100644
--- a/gcc/ada/prj-conf.adb
+++ b/gcc/ada/prj-conf.adb
@@ -1630,7 +1630,7 @@ package body Prj.Conf is
-- Start with ignoring missing withed projects
- Update_Ignore_Missing_With (Env.Flags, True);
+ Set_Ignore_Missing_With (Env.Flags, True);
-- Note: If in fact the config file is automatically generated, then
-- Automatically_Generated will be set to True after invocation of
@@ -1751,7 +1751,7 @@ package body Prj.Conf is
-- update the project path and try again.
if Main_Project /= No_Project and then Config_Try_Again then
- Update_Ignore_Missing_With (Env.Flags, False);
+ Set_Ignore_Missing_With (Env.Flags, False);
if Config_File_Path /= null then
Conf_File_Name := new String'(Config_File_Path.all);
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index 8a267cf..b696e2a 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -2147,16 +2147,17 @@ package body Prj is
(Root_Project, Root_Tree, Project_Context'(False, False));
end For_Project_And_Aggregated_Context;
- --------------------------------
- -- Update_Ignore_Missing_With --
- --------------------------------
+ -----------------------------
+ -- Set_Ignore_Missing_With --
+ -----------------------------
- procedure Update_Ignore_Missing_With
- (Flags : in out Processing_Flags; Value : Boolean)
+ procedure Set_Ignore_Missing_With
+ (Flags : in out Processing_Flags;
+ Value : Boolean)
is
begin
Flags.Ignore_Missing_With := Value;
- end Update_Ignore_Missing_With;
+ end Set_Ignore_Missing_With;
-- Package initialization for Prj
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index 4ba3fac..6266a0a 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -1893,9 +1893,10 @@ package Prj is
-- * user project also includes a "with" that can only be resolved
-- once we have found the gnatls
- procedure Update_Ignore_Missing_With
- (Flags : in out Processing_Flags; Value : Boolean);
- -- Update the value of component Ignore_Missing_With in Flags with Value
+ procedure Set_Ignore_Missing_With
+ (Flags : in out Processing_Flags;
+ Value : Boolean);
+ -- Set the value of component Ignore_Missing_With in Flags to Value
Gprbuild_Flags : constant Processing_Flags;
Gprinstall_Flags : constant Processing_Flags;