* [PATCH][4/n] loop distribution TLC
@ 2012-06-01 11:36 Richard Guenther
0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2012-06-01 11:36 UTC (permalink / raw)
To: gcc-patches
This fixes an oversight.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2012-06-01 Richard Guenther <rguenther@suse.de>
* tree-loop-distribution.c (stmt_has_scalar_dependences_outside_loop):
Handle PHIs.
(classify_partition): Likewise.
Index: gcc/tree-loop-distribution.c
===================================================================
--- gcc/tree-loop-distribution.c (revision 188104)
+++ gcc/tree-loop-distribution.c (working copy)
@@ -129,6 +129,9 @@ stmt_has_scalar_dependences_outside_loop
def_operand_p def_p;
ssa_op_iter op_iter;
+ if (gimple_code (stmt) == GIMPLE_PHI)
+ return ssa_name_has_uses_outside_loop_p (gimple_phi_result (stmt), loop);
+
FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, op_iter, SSA_OP_DEF)
if (ssa_name_has_uses_outside_loop_p (DEF_FROM_PTR (def_p), loop))
return true;
@@ -813,8 +816,7 @@ classify_partition (loop_p loop, struct
/* If the stmt has uses outside of the loop fail.
??? If the stmt is generated in another partition that
is not created as builtin we can ignore this. */
- if (gimple_code (stmt) != GIMPLE_PHI
- && stmt_has_scalar_dependences_outside_loop (loop, stmt))
+ if (stmt_has_scalar_dependences_outside_loop (loop, stmt))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "not generating builtin, partition has "
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-01 11:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-01 11:36 [PATCH][4/n] loop distribution TLC Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).