aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-03-11 10:09:43 +0100
committerRichard Biener <rguenther@suse.de>2021-03-11 12:36:37 +0100
commitb08c978f2e18507cbd9853305185665edf05c598 (patch)
tree6c7c7f7a8727cc6fc54c74a74c8df1e38b420655 /gcc
parent070ab283d16d8e8e8bb70f9801aca347f008cbd0 (diff)
downloadgcc-b08c978f2e18507cbd9853305185665edf05c598.zip
gcc-b08c978f2e18507cbd9853305185665edf05c598.tar.gz
gcc-b08c978f2e18507cbd9853305185665edf05c598.tar.bz2
tree-optimization/99523 - missing SSA decls in dumps
This makes sure to dump SSA names without identifier in the declaration part of a function dump. While we dump the anonymous variable decls the SSA names referencing them appear without a clear reference as to what anonymous variable is used (_3 vs. D.1234). 2021-03-11 Richard Biener <rguenther@suse.de> PR tree-optimization/99523 * tree-cfg.c (dump_function_to_file): Dump SSA names w/o identifier to the decls section as well, not only those without a VAR_DECL.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-cfg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index d04ce21..7e3aae5 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -8155,7 +8155,12 @@ dump_function_to_file (tree fndecl, FILE *file, dump_flags_t flags)
if (gimple_in_ssa_p (cfun))
FOR_EACH_SSA_NAME (ix, name, cfun)
{
- if (!SSA_NAME_VAR (name))
+ if (!SSA_NAME_VAR (name)
+ /* SSA name with decls without a name still get
+ dumped as _N, list those explicitely as well even
+ though we've dumped the decl declaration as D.xxx
+ above. */
+ || !SSA_NAME_IDENTIFIER (name))
{
fprintf (file, " ");
print_generic_expr (file, TREE_TYPE (name), flags);