[PATCH] D17946: Add a flag to the LLVMContext to disable name for Value other than GlobalValue

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 17:09:10 PST 2016


joker.eph added a comment.

Note: this would make the first template parameter of the IR builder "PreserveName" obsolete. 
Some passes such as SROA were doing:

  /// \brief Provide a typedef for IRBuilder that drops names in release builds.
  #ifndef NDEBUG
  typedef llvm::IRBuilder<true, ConstantFolder, IRBuilderPrefixedInserter<true>>
      IRBuilderTy;
  #else
  typedef llvm::IRBuilder<false, ConstantFolder, IRBuilderPrefixedInserter<false>>
      IRBuilderTy;
  #endif
  }

I thought about applying this runtime check in the IRBuilder itself, but many passes are not going through the IRBuilder and creates value directly.


http://reviews.llvm.org/D17946





More information about the llvm-commits mailing list