[PATCH] D33642: [Polly] Do not add terminator & synthesizable instructions to the output instructions in ScopInfo pass
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 29 05:28:08 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL304151: [ScopInfo] Do not add terminator & synthesizable instructions to the output… (authored by Meinersbur).
Changed prior to commit:
https://reviews.llvm.org/D33642?vs=100598&id=100604#toc
Repository:
rL LLVM
https://reviews.llvm.org/D33642
Files:
polly/trunk/lib/Analysis/ScopBuilder.cpp
polly/trunk/test/ScopInfo/statement.ll
Index: polly/trunk/lib/Analysis/ScopBuilder.cpp
===================================================================
--- polly/trunk/lib/Analysis/ScopBuilder.cpp
+++ polly/trunk/lib/Analysis/ScopBuilder.cpp
@@ -640,8 +640,11 @@
buildStmts(*I->getNodeAs<Region>());
else {
std::vector<Instruction *> Instructions;
- for (Instruction &Inst : *I->getNodeAs<BasicBlock>())
- Instructions.push_back(&Inst);
+ for (Instruction &Inst : *I->getNodeAs<BasicBlock>()) {
+ Loop *L = LI.getLoopFor(Inst.getParent());
+ if (!isa<TerminatorInst>(&Inst) && !canSynthesize(&Inst, *scop, &SE, L))
+ Instructions.push_back(&Inst);
+ }
Loop *SurroundingLoop = LI.getLoopFor(I->getNodeAs<BasicBlock>());
scop->addScopStmt(I->getNodeAs<BasicBlock>(), SurroundingLoop,
Instructions);
Index: polly/trunk/test/ScopInfo/statement.ll
===================================================================
--- polly/trunk/test/ScopInfo/statement.ll
+++ polly/trunk/test/ScopInfo/statement.ll
@@ -9,13 +9,8 @@
; }
; CHECK: Instructions {
-; CHECK-NEXT: %idxprom = sext i32 %i.0 to i64
-; CHECK-NEXT: %arrayidx = getelementptr inbounds i32, i32* %A, i64 %idxprom
; CHECK-NEXT: store i32 %i.0, i32* %arrayidx, align 4
-; CHECK-NEXT: %idxprom1 = sext i32 %i.0 to i64
-; CHECK-NEXT: %arrayidx2 = getelementptr inbounds i32, i32* %B, i64 %idxprom1
; CHECK-NEXT: store i32 %i.0, i32* %arrayidx2, align 4
-; CHECK-NEXT: br label %for.inc
; CHECK-NEXT: }
; Function Attrs: noinline nounwind uwtable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33642.100604.patch
Type: text/x-patch
Size: 1621 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170529/6c10ca73/attachment.bin>
More information about the llvm-commits
mailing list