[PATCH] D17946: Add a flag to the LLVMContext to disable name for Value other than GlobalValue
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 8 10:34:35 PST 2016
Rafael EspĂndola <rafael.espindola at gmail.com> writes:
> This looks like a good idea, but you should delete the PreserveName
> option in a followup commit :-)
I agree. This approach seems cleaner and strictly more useful than the
IRBuilder template parameter. This removes names more effectively in
places that don't use IRBuilder, and being able to explicitly turn the
names back on even in release mode should also be very nice for writing
tests.
> On 7 March 2016 at 20:09, Mehdi AMINI via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> 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
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list