[llvm-dev] Textual IR value names

Cranmer, Joshua via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 10 12:13:56 PST 2019


While I understand the value of turning it off, it is somewhat annoying when you're trying to run a clang -S -emit-llvm to discover that you're not getting any value names. I would suggest that, irrespective of the kind of build you use, -S -emit-llvm should cause the value names to be defaulted to on as a principle of least surprise to the user.

-----Original Message-----
From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of David Greene via llvm-dev
Sent: Thursday, January 10, 2019 15:05
To: Craig Topper <craig.topper at gmail.com>
Cc: llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] Textual IR value names

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

> 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 CMake option could override the current behavior.  Then users wouldn't be forced to remember to set an option to make release compilers faster.

In the end it's not a huge deal, I just found keying off asserts to be quite surprising and it took some time for me to figure out what was going on.

                            -David
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list