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

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 9 17:50:49 PST 2016


reames added a comment.

In http://reviews.llvm.org/D17946#371188, @joker.eph wrote:

> Hey Philip,
>
> Thanks for chiming in.
>  Can you articulate what you have in mind for "an invariant for the optimizer wherein we only introduce named instructions if the instruction being replaced was named. Same with basic blocks."?
>  I don't visualize how it would be expressed in practice, unless you intend to audit all the passes and change all the places where prefix/suffix are introduced?


Yes.  If we have code which unconditionally adds a suffix, it would become if (hasName() ? getName() + "suffix" : "").  This seems entirely reasonable.


http://reviews.llvm.org/D17946





More information about the llvm-commits mailing list