[polly] r278014 - [CodeGeneration] Do not set insert position redundantly

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 8 08:25:50 PDT 2016


Author: grosser
Date: Mon Aug  8 10:25:50 2016
New Revision: 278014

URL: http://llvm.org/viewvc/llvm-project?rev=278014&view=rev
Log:
[CodeGeneration] Do not set insert position redundantly

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.

Modified:
    polly/trunk/lib/CodeGen/CodeGeneration.cpp

Modified: polly/trunk/lib/CodeGen/CodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/CodeGeneration.cpp?rev=278014&r1=278013&r2=278014&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/CodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/CodeGeneration.cpp Mon Aug  8 10:25:50 2016
@@ -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);




More information about the llvm-commits mailing list