[polly] handle only loops in LCSSA form

Sebastian Pop spop at codeaurora.org
Thu Mar 7 13:29:50 PST 2013


Hi Tobi,

with all the ivcanon removal patches on, I see several ICEs related to the fact
that we create an invalid SSA form: when Polly copies the following basic block
from the testcase:

for.cond.for.end_crit_edge:                       ; preds = %for.body
  store i32 %inc, i32* %from.addr.1.lcssa.reg2mem
  br label %for.end.single_exit

it copies it outside the scop region that is limited to the loop itself: that
makes a definition from the loop body "%inc" used outside the region that polly
versions, and that makes this use not fully dominated by its definition.

The attached patch filters out all the loops that are not in loop closed SSA
form.  These loops have to be converted in LCSSA form and specially handled by
translating out of SSA the scalar variables defined in loops and used outside
the loop (that's how Graphite is handling these scalar dependences.)

The patch solves one of the most frequent ICE with the IVcanon pass removed,
attached a bugpoint reduced testcase from the llvm nightly testsuite.

The patch is disabling some checks in test/IndependentBlocks/scalar_to_array.ll
I think that we could rework these testcases to make them fit in the LCSSA form.

Sebastian
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-handle-only-loops-in-LCSSA-form.patch
Type: text/x-diff
Size: 7217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130307/d33b5dcc/attachment.patch>


More information about the llvm-commits mailing list