diff options
author | Gary Dismukes <dismukes@adacore.com> | 2019-09-19 08:13:34 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-09-19 08:13:34 +0000 |
commit | 143df1f9aa4e829907d4e300a0006783fcbba71b (patch) | |
tree | 1db92dfc561a8d841375a7f95440ecd5e50fb717 /gcc | |
parent | 1dd3915be108e6dcd7adfa01de6096419092a5de (diff) | |
download | gcc-143df1f9aa4e829907d4e300a0006783fcbba71b.zip gcc-143df1f9aa4e829907d4e300a0006783fcbba71b.tar.gz gcc-143df1f9aa4e829907d4e300a0006783fcbba71b.tar.bz2 |
[Ada] Suppress GNAT FE up-level reference transformation for GNAT-LLVM
In the case of GNAT-LLVM, the GNAT FE no longer does expansion of
up-level references identified by the subprogram unnesting machinery
into activation record references. This is now only done by the FE when
generating C code. This expansion is already taken care of by the
gnat-llvm middle phase, so there's no benefit to also doing it in the
front end.
2019-09-19 Gary Dismukes <dismukes@adacore.com>
gcc/ada/
* exp_unst.adb (Unnest_Subprogram): Bypass the transformation of
up-level references unless Opt.Generate_C_Code is enabled.
From-SVN: r275942
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/exp_unst.adb | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 37576aa..86e9f07 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-09-19 Gary Dismukes <dismukes@adacore.com> + + * exp_unst.adb (Unnest_Subprogram): Bypass the transformation of + up-level references unless Opt.Generate_C_Code is enabled. + 2019-09-19 Eric Botcazou <ebotcazou@adacore.com> * exp_ch4.adb (Expand_Array_Equality): If optimization is diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb index 8c492bc..b25b449 100644 --- a/gcc/ada/exp_unst.adb +++ b/gcc/ada/exp_unst.adb @@ -2177,11 +2177,14 @@ package body Exp_Unst is -- not need rewriting (e.g. the appearence in a conversion). -- Also ignore if no reference was specified or if the rewriting -- has already been done (this can happen if the N_Identifier - -- occurs more than one time in the tree). + -- occurs more than one time in the tree). Also ignore references + -- when not generating C code (in particular for the case of LLVM, + -- since GNAT-LLVM will handle the processing for up-level refs). if No (UPJ.Ref) or else not Is_Entity_Name (UPJ.Ref) or else not Present (Entity (UPJ.Ref)) + or else not Opt.Generate_C_Code then goto Continue; end if; |