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
> -----Original Message----- > From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of > Cranmer, Joshua via llvm-dev > Sent: Thursday, January 10, 2019 3:14 PM > To: David Greene; Craig Topper > Cc: llvm-dev at lists.llvm.org > Subject: Re: [llvm-dev] Textual IR value names > > 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.Sounds like you want to file a feature-request bugzilla. And it's more or less the same thing that David Greene seems to want. --paulr> > -----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 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
+1! I didn't realize that you could even change that in a release build, but I concur that it should be enabled by default at least when emitting textual asm. The efficiency rationale for having it default off doesn't really seem to apply to that case. On Thu, Jan 10, 2019 at 3:14 PM Cranmer, Joshua via llvm-dev < llvm-dev at lists.llvm.org> wrote:> 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 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190110/f176140d/attachment.html>
Having it by default for -S -emit-llvm seems like a good default to me. Is it enough to make clang's behavior independent of the build settings? -- Mehdi On Thu, Jan 10, 2019 at 1:14 PM James Y Knight via llvm-dev < llvm-dev at lists.llvm.org> wrote:> +1! I didn't realize that you could even change that in a release build, > but I concur that it should be enabled by default at least when emitting > textual asm. The efficiency rationale for having it default off doesn't > really seem to apply to that case. > > On Thu, Jan 10, 2019 at 3:14 PM Cranmer, Joshua via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> 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 >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190110/6c5a8ca9/attachment.html>