[PATCH] D47874: [SCEVExp] Advance found insertion point until we find a non-dbg instruction.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 21 06:56:33 PDT 2018
fhahn updated this revision to Diff 152287.
fhahn added a comment.
Update to use skipDebugInfo introduced in https://reviews.llvm.org/rL335083
https://reviews.llvm.org/D47874
Files:
lib/Analysis/ScalarEvolutionExpander.cpp
Index: lib/Analysis/ScalarEvolutionExpander.cpp
===================================================================
--- lib/Analysis/ScalarEvolutionExpander.cpp
+++ lib/Analysis/ScalarEvolutionExpander.cpp
@@ -162,7 +162,8 @@
// Cast the instruction immediately after the instruction.
Instruction *I = cast<Instruction>(V);
- BasicBlock::iterator IP = findInsertPointAfter(I, Builder.GetInsertBlock());
+ BasicBlock::iterator IP = skipDebugInfo(
+ findInsertPointAfter(I, Builder.GetInsertBlock()));
return ReuseOrCreateCast(I, Ty, Op, IP);
}
@@ -1480,8 +1481,8 @@
NewOps[i] = SE.getAnyExtendExpr(S->op_begin()[i], CanonicalIV->getType());
Value *V = expand(SE.getAddRecExpr(NewOps, S->getLoop(),
S->getNoWrapFlags(SCEV::FlagNW)));
- BasicBlock::iterator NewInsertPt =
- findInsertPointAfter(cast<Instruction>(V), Builder.GetInsertBlock());
+ BasicBlock::iterator NewInsertPt = skipDebugInfo(
+ findInsertPointAfter(cast<Instruction>(V), Builder.GetInsertBlock()));
V = expandCodeFor(SE.getTruncateExpr(SE.getUnknown(V), Ty), nullptr,
&*NewInsertPt);
return V;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47874.152287.patch
Type: text/x-patch
Size: 1187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180621/321b9000/attachment.bin>
More information about the llvm-commits
mailing list