diff options
author | Andrew Pinski <apinski@marvell.com> | 2021-10-16 02:30:55 +0000 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2021-10-21 08:18:58 +0000 |
commit | 005ebe1c07843e6312cd70523945fa1d729e7253 (patch) | |
tree | 8bceccfbc88eebf3dd740d8bd63d34078a824160 /gcc/tree-cfg.c | |
parent | 70e72c3a11315fb6a228b7f58d027c2e1fbb9940 (diff) | |
download | gcc-005ebe1c07843e6312cd70523945fa1d729e7253.zip gcc-005ebe1c07843e6312cd70523945fa1d729e7253.tar.gz gcc-005ebe1c07843e6312cd70523945fa1d729e7253.tar.bz2 |
Add dump prints when execute_fixup_cfg removes a write only var store.
While debugging PR 102703, I found it was hard to figure out where
the store was being removed as there was no pass which was outputting
why the store was removed.
This adds to execute_fixup_cfg the output.
Also note most of removals happen when execute_fixup_cfg is called
from the inliner.
gcc/ChangeLog:
* tree-cfg.c (execute_fixup_cfg): Output when the statement
is removed when it is a write only var.
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 4b4b0b5..b78e456 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -9737,6 +9737,13 @@ execute_fixup_cfg (void) && (TREE_STATIC (lhs) || DECL_EXTERNAL (lhs)) && varpool_node::get (lhs)->writeonly) { + if (dump_file && (dump_flags & TDF_DETAILS)) + { + fprintf (dump_file, "Removing statement, writes" + " to write only var:\n"); + print_gimple_stmt (dump_file, stmt, 0, + TDF_VOPS|TDF_MEMSYMS); + } unlink_stmt_vdef (stmt); gsi_remove (&gsi, true); release_defs (stmt); |