[polly] r263322 - Revert "Update Polly for the removal of PreserveNames from IRBuilder stuff"

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 17:53:29 PST 2016


Author: dblaikie
Date: Fri Mar 11 19:53:28 2016
New Revision: 263322

URL: http://llvm.org/viewvc/llvm-project?rev=263322&view=rev
Log:
Revert "Update Polly for the removal of PreserveNames from IRBuilder stuff"

The original r263258 was reverted in r263321 due to issues with Release
testing.

This reverts commit r263296.

Modified:
    polly/trunk/include/polly/CodeGen/IRBuilder.h

Modified: polly/trunk/include/polly/CodeGen/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/IRBuilder.h?rev=263322&r1=263321&r2=263322&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/IRBuilder.h (original)
+++ polly/trunk/include/polly/CodeGen/IRBuilder.h Fri Mar 11 19:53:28 2016
@@ -108,29 +108,33 @@ private:
 ///
 /// This is used to add additional items such as e.g. the llvm.loop.parallel
 /// metadata.
-class IRInserter : protected llvm::IRBuilderDefaultInserter {
+template <bool PreserveNames>
+class PollyBuilderInserter
+    : protected llvm::IRBuilderDefaultInserter<PreserveNames> {
 public:
-  IRInserter() = default;
-  IRInserter(class ScopAnnotator &A) : Annotator(&A) {}
+  PollyBuilderInserter() : Annotator(0) {}
+  PollyBuilderInserter(class ScopAnnotator &A) : Annotator(&A) {}
 
 protected:
   void InsertHelper(llvm::Instruction *I, const llvm::Twine &Name,
                     llvm::BasicBlock *BB,
                     llvm::BasicBlock::iterator InsertPt) const {
-    llvm::IRBuilderDefaultInserter::InsertHelper(I, Name, BB, InsertPt);
+    llvm::IRBuilderDefaultInserter<PreserveNames>::InsertHelper(I, Name, BB,
+                                                                InsertPt);
     if (Annotator)
       Annotator->annotate(I);
   }
 
 private:
-  class ScopAnnotator *Annotator = nullptr;
+  class ScopAnnotator *Annotator;
 };
 
 // TODO: We should not name instructions in NDEBUG builds.
 //
 // We currently always name instructions, as the polly test suite currently
 // matches for certain names.
-typedef llvm::IRBuilder<llvm::ConstantFolder, IRInserter> PollyIRBuilder;
+typedef PollyBuilderInserter<true> IRInserter;
+typedef llvm::IRBuilder<true, llvm::ConstantFolder, IRInserter> PollyIRBuilder;
 
 /// @brief Return an IR builder pointed before the @p BB terminator.
 static inline PollyIRBuilder createPollyIRBuilder(llvm::BasicBlock *BB,




More information about the llvm-commits mailing list