Commit 3a7cd438 by Sebastian Pop Committed by Sebastian Pop

Speed-up loop blocking: strip-mining is always legal.

2010-08-23  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-blocking.c (scop_do_strip_mine): Do not call
	graphite_legal_transform.
	(scop_do_block): Same.

From-SVN: r164793
parent 45fc26fc
2010-09-30 Sebastian Pop <sebastian.pop@amd.com>
* graphite-blocking.c (scop_do_strip_mine): Do not call
graphite_legal_transform.
(scop_do_block): Same.
2010-09-30 Vladimir Kargov <kargov@gmail.com> 2010-09-30 Vladimir Kargov <kargov@gmail.com>
* graphite-scop-detection.c (graphite_can_represent_loop): Correct the * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
2010-08-23 Sebastian Pop <sebastian.pop@amd.com>
* graphite-blocking.c (scop_do_strip_mine): Do not call
graphite_legal_transform.
(scop_do_block): Same.
2010-08-20 Vladimir Kargov <kargov@gmail.com> 2010-08-20 Vladimir Kargov <kargov@gmail.com>
* graphite-scop-detection.c (graphite_can_represent_loop): Correct the * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
......
...@@ -254,28 +254,13 @@ lst_do_strip_mine (lst_p lst) ...@@ -254,28 +254,13 @@ lst_do_strip_mine (lst_p lst)
return res; return res;
} }
/* Strip mines all the loops in SCOP. Nothing profitable in all this: /* Strip mines all the loops in SCOP. Returns true when some loops
this is just a driver function. */ have been strip-mined. */
bool bool
scop_do_strip_mine (scop_p scop) scop_do_strip_mine (scop_p scop)
{ {
bool transform_done = false; return lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop));
store_scattering (scop);
transform_done = lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop));
if (!transform_done)
return false;
if (!graphite_legal_transform (scop))
{
restore_scattering (scop);
return false;
}
return transform_done;
} }
/* Loop blocks all the loops in SCOP. Returns true when we manage to /* Loop blocks all the loops in SCOP. Returns true when we manage to
...@@ -292,10 +277,10 @@ scop_do_block (scop_p scop) ...@@ -292,10 +277,10 @@ scop_do_block (scop_p scop)
strip_mined = lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop)); strip_mined = lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop));
interchanged = scop_do_interchange (scop); interchanged = scop_do_interchange (scop);
/* If we don't interchange loops, then the strip mine is not /* If we don't interchange loops, the strip mine alone will not be
profitable, and the transform is not a loop blocking. */ profitable, and the transform is not a loop blocking: so revert
if (!interchanged the transform. */
|| !graphite_legal_transform (scop)) if (!interchanged)
{ {
restore_scattering (scop); restore_scattering (scop);
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment