[PATCH] [LCSSA] Handle PHI insertion in disjoint loops
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Thu Dec 11 11:53:16 PST 2014
Hi chandlerc, hfinkel,
Take two disjoint Loops L1 and L2.
LoopSimplify skips to simplify some loops (e.g. when indirect branches are involved). In such situations, it can happen that an exit for L1 is the header of L2. Thus, when we create PHIs in one of such exits we are also inserting PHIs in L2 header.
This could break LCSSA form for L2 because these inserted PHIs can also have uses in L2 exits, which are never handled in the current implementation. Provide a fix for this corner case and test that we don't assert/crash on that.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D6624
Files:
include/llvm/Transforms/Utils/LoopUtils.h
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Utils/LCSSA.cpp
lib/Transforms/Utils/LoopUnroll.cpp
test/Transforms/LCSSA/indirectbr.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6624.17179.patch
Type: text/x-patch
Size: 7780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141211/05b843c1/attachment.bin>
More information about the llvm-commits
mailing list