[CodeGeneration] Do not set insert position redundantly
authorTobias Grosser <tobias@grosser.es>
Mon, 8 Aug 2016 15:25:50 +0000 (15:25 +0000)
committerTobias Grosser <tobias@grosser.es>
Mon, 8 Aug 2016 15:25:50 +0000 (15:25 +0000)
There is no need to reset the position of the builder, as we can just continue
to insert code at the current position of the IRBuilder, which happens to
be precisely the location we reset the builder to.

llvm-svn: 278014

polly/lib/CodeGen/CodeGeneration.cpp

index 4550a05..b13118c 100644 (file)
@@ -73,7 +73,6 @@ public:
   ///
   /// @return A value evaluating to true/false if execution is save/unsafe.
   Value *buildRTC(PollyIRBuilder &Builder, IslExprBuilder &ExprBuilder) {
-    Builder.SetInsertPoint(Builder.GetInsertBlock()->getTerminator());
     Value *RTC = ExprBuilder.create(AI->getRunCondition());
     if (!RTC->getType()->isIntegerTy(1))
       RTC = Builder.CreateIsNotNull(RTC);