[llvm-dev] why LoopInfoWrapperPass can not detect all the canonical loops?
Dong Chen via llvm-dev
llvm-dev at lists.llvm.org
Wed Aug 3 15:42:45 PDT 2016
The original cl code contains 2 canonical loops (start from 0 with stride
1). But the analysis pass LoopInfoWrapperPass only detect one of them,
anybody knows why?
The analysis pass LoopInfoWrapperPass is called from a function pass by the
following statements:
LoopInfo& LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
for(LoopInfo::iterator l = LI.begin(), lend = LI.end(); l != lend; ++l){
PHINode* phi = (*l)->getCanonicalInductionVariable();
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160803/a5279e0b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stencil.cl
Type: application/octet-stream
Size: 683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160803/a5279e0b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stencil.ll
Type: application/octet-stream
Size: 5275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160803/a5279e0b/attachment-0001.obj>
More information about the llvm-dev
mailing list