[llvm-dev] Textual IR value names (original) (raw)

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 9 14:41:21 PST 2019


The names are dropped to save memory when a release build of the compiler is being used. This is what you probably want on a release compiler you intend to ship since it should be faster. The NDEBUG check is an easy way to tell the difference between release and debug builds. People probably don't want to have to remember to set an additional cmake option to make a release compiler faster.

The -fdiscard-value-names/-fno-discard-value-names was added about a year ago https://reviews.llvm.org/D42887 not sure if there is more discussion about the asserts behavior discussed there.

~Craig

On Wed, Jan 9, 2019 at 2:25 PM David Greene <dag at cray.com> wrote:

Craig Topper via llvm-dev <llvm-dev at lists.llvm.org> writes:

> And the clang behavior can be controlled with - > fdiscard-value-names/-fno-discard-value-names That's a little better for users, but again, why should the default behavior change based on whether or not asserts are enabled? -David -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190109/803a322c/attachment.html>



More information about the llvm-dev mailing list