Make fdump-tree-sccp-details more complete
authorTom de Vries <tom@codesourcery.com>
Tue, 17 Nov 2015 21:42:27 +0000 (21:42 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Tue, 17 Nov 2015 21:42:27 +0000 (21:42 +0000)
2015-11-17  Tom de Vries  <tom@codesourcery.com>

* tree-scalar-evolution.c (scev_const_prop): Dump details if replacing
uses of ssa_name with constant.

From-SVN: r230504

gcc/ChangeLog
gcc/tree-scalar-evolution.c

index a21f18bbb8200efdea351966e4206672ac5c2cf1..8267d67c956e6185b5b39dba66849ae2a9410607 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-17  Tom de Vries  <tom@codesourcery.com>
+
+       * tree-scalar-evolution.c (scev_const_prop): Dump details if replacing
+       uses of ssa_name with constant.
+
 2015-11-17  Tom de Vries  <tom@codesourcery.com>
 
        * tree-ssa-ccp.c (do_ssa_ccp): Clear LOOP_CLOSED_SSA in loops state if
index e90aafb771cc5065126322e93a00ff3d0286ebb1..27630f0e92989516ee36b70188a2925e284650a7 100644 (file)
@@ -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);