diff mbox

Make fdump-tree-sccp-details more complete

Message ID 564A4CF9.4060300@mentor.com
State New
Headers show

Commit Message

Tom de Vries Nov. 16, 2015, 9:39 p.m. UTC
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

Comments

Richard Biener Nov. 17, 2015, 9:57 a.m. UTC | #1
On Mon, Nov 16, 2015 at 10:39 PM, Tom de Vries <Tom_deVries@mentor.com> wrote:
> 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?

Ok.

Richard.

> Thanks,
> - Tom
diff mbox

Patch

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);