This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Make fdump-tree-sccp-details more complete
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Date: Mon, 16 Nov 2015 22:39:05 +0100
- Subject: [PATCH] Make fdump-tree-sccp-details more complete
- Authentication-results: sourceware.org; auth=none
Hi,
pass_scev_cprop contains a bit where it replaces uses of an ssa-name
with constants. This is currently not noted in the dump-file, even with
TDF_DETAILS.
This patch adds that information in the dump-file, in this format:
...
Replacing uses of: D__lsm.10_34 with: 10000
...
OK for trunk if bootstrap and reg-test succeeds?
Thanks,
- Tom
Make fdump-tree-sccp-details more complete
2015-11-16 Tom de Vries <tom@codesourcery.com>
* tree-scalar-evolution.c (scev_const_prop): Dump details if replacing
uses of ssa_name with constant.
---
gcc/tree-scalar-evolution.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index e90aafb..27630f0 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -3465,7 +3465,17 @@ scev_const_prop (void)
/* Replace the uses of the name. */
if (name != ev)
- replace_uses_by (name, ev);
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "Replacing uses of: ");
+ print_generic_expr (dump_file, name, 0);
+ fprintf (dump_file, " with: ");
+ print_generic_expr (dump_file, ev, 0);
+ fprintf (dump_file, "\n");
+ }
+ replace_uses_by (name, ev);
+ }
if (!ssa_names_to_remove)
ssa_names_to_remove = BITMAP_ALLOC (NULL);