diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2013-11-13 12:15:47 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2013-11-13 12:15:47 +0000 |
commit | cfb9edba16820a3360456a502931c80da6b734a5 (patch) | |
tree | 2d7285885f7ee30b8a9be28547a4cc24eea954fd /gcc/cfgexpand.c | |
parent | cb076acf4676d7d0d549dfd634bf865deda72f40 (diff) | |
download | gcc-cfb9edba16820a3360456a502931c80da6b734a5.zip gcc-cfb9edba16820a3360456a502931c80da6b734a5.tar.gz gcc-cfb9edba16820a3360456a502931c80da6b734a5.tar.bz2 |
cfgexpand.c (expand_used_vars): Allocate space for partitions based on PARM_DECLs or RESULT_DECLs only if...
* cfgexpand.c (expand_used_vars): Allocate space for partitions based
on PARM_DECLs or RESULT_DECLs only if they are ignored for debug info
or if optimization is enabled.
* tree-ssa-coalesce.c (coalesce_ssa_name): If optimization is disabled,
require that all the names based on a PARM_DECL or a RESULT_DECL that
isn't ignored for debug info be coalesced.
From-SVN: r204742
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 4e622c0..de7a7b3 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1610,9 +1610,15 @@ expand_used_vars (void) replace_ssa_name_symbol (var, (tree) *slot); } + /* Always allocate space for partitions based on VAR_DECLs. But for + those based on PARM_DECLs or RESULT_DECLs and which matter for the + debug info, there is no need to do so if optimization is disabled + because all the SSA_NAMEs based on these DECLs have been coalesced + into a single partition, which is thus assigned the canonical RTL + location of the DECLs. */ if (TREE_CODE (SSA_NAME_VAR (var)) == VAR_DECL) expand_one_var (var, true, true); - else + else if (DECL_IGNORED_P (SSA_NAME_VAR (var)) || optimize) { /* This is a PARM_DECL or RESULT_DECL. For those partitions that contain the default def (representing the parm or result itself) |