[patch] more graphite/vta fixes

Aldy Hernandez aldyh@redhat.com
Tue Mar 16 15:57:00 GMT 2010


This is a fix for gcc.dg/graphite/pr42180.f90 run with -fcompare-debug.

In this testcase we end up with a different set of basic blocks because
we split a BB unecessarily on the debug path.  What is happening is that
we split the BB here:

# prephitmp.18_99 = PHI <0.0(3), pretmp.20_98(15)>
# DEBUG theta_l12 => NULL
D.1586_48 = prephitmp.10_82 + prephitmp.18_99;
**** <SPLIT-HERE> *****
*l12_41(D) = D.1586_48;
# DEBUG i => i_1 + 1

...but fail to exit early because we get confused by the debug
statement.

Fixed thusly.

OK for trunk?

	* graphite-sese-to-poly.c (split_reduction_stmt): Skip debug
	statements before splitting block.

Index: graphite-sese-to-poly.c
===================================================================
--- graphite-sese-to-poly.c	(revision 157481)
+++ graphite-sese-to-poly.c	(working copy)
@@ -2466,7 +2466,7 @@ split_reduction_stmt (gimple stmt)
 
   split_block (bb, stmt);
 
-  if (gsi_one_before_end_p (gsi_start_bb (bb)))
+  if (gsi_one_before_end_p (gsi_start_nondebug_bb (bb)))
     return bb;
 
   gsi = gsi_last_bb (bb);



More information about the Gcc-patches mailing list