diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-03-13 22:21:43 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-03-13 22:21:43 +0000 |
commit | 16c445ae9205dad9b435ca08c5b55e14cbeb41d8 (patch) | |
tree | 707ad59e9214b2fe36ad077e7ce0b1970a8c48e2 | |
parent | cc232d1f908bf09b1f0065aef4254245dd0677e9 (diff) | |
download | bcm5719-llvm-16c445ae9205dad9b435ca08c5b55e14cbeb41d8.tar.gz bcm5719-llvm-16c445ae9205dad9b435ca08c5b55e14cbeb41d8.zip |
Revert "Revert "Update Polly for the removal of PreserveNames from IRBuilder stuff""
This reverts commit r263322 and reapplies r263296. The original
r263258 was reapplied in LLVM after being reverted in r263321 due to
issues with Release testing in Clang.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263399
-rw-r--r-- | polly/include/polly/CodeGen/IRBuilder.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/polly/include/polly/CodeGen/IRBuilder.h b/polly/include/polly/CodeGen/IRBuilder.h index 151975a0abc..169e288015f 100644 --- a/polly/include/polly/CodeGen/IRBuilder.h +++ b/polly/include/polly/CodeGen/IRBuilder.h @@ -108,33 +108,29 @@ private: /// /// This is used to add additional items such as e.g. the llvm.loop.parallel /// metadata. -template <bool PreserveNames> -class PollyBuilderInserter - : protected llvm::IRBuilderDefaultInserter<PreserveNames> { +class IRInserter : protected llvm::IRBuilderDefaultInserter { public: - PollyBuilderInserter() : Annotator(0) {} - PollyBuilderInserter(class ScopAnnotator &A) : Annotator(&A) {} + IRInserter() = default; + IRInserter(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<PreserveNames>::InsertHelper(I, Name, BB, - InsertPt); + llvm::IRBuilderDefaultInserter::InsertHelper(I, Name, BB, InsertPt); if (Annotator) Annotator->annotate(I); } private: - class ScopAnnotator *Annotator; + class ScopAnnotator *Annotator = nullptr; }; // 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 PollyBuilderInserter<true> IRInserter; -typedef llvm::IRBuilder<true, llvm::ConstantFolder, IRInserter> PollyIRBuilder; +typedef llvm::IRBuilder<llvm::ConstantFolder, IRInserter> PollyIRBuilder; /// @brief Return an IR builder pointed before the @p BB terminator. static inline PollyIRBuilder createPollyIRBuilder(llvm::BasicBlock *BB, |