[cfe-commits] r59094 - in /cfe/trunk/lib/CodeGen: CGBuilder.h CodeGenFunction.h

Eli Friedman eli.friedman at gmail.com
Tue Nov 11 20:11:16 PST 2008

On Tue, Nov 11, 2008 at 7:58 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> Hi Eli,
> On Tue, Nov 11, 2008 at 6:30 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>> On Tue, Nov 11, 2008 at 4:01 PM, Daniel Dunbar <daniel at zuster.org> wrote:
>>> Author: ddunbar
>>> Date: Tue Nov 11 18:01:12 2008
>>> New Revision: 59094
>>> URL: http://llvm.org/viewvc/llvm-project?rev=59094&view=rev
>>> Log:
>>> Disable generation of basic block names in NDEBUG mode.
>>> Revert to enabling generation of instruction names when not in NDEBUG
>>> mode.
>> Is this really a good idea?  Normally NDEBUG doesn't change the
>> visible behavior of the program.
> One response would be that the names on LLVM instructions aren't
> intended to be part of the "visible" behavior of the compiler.
> Actually, I would prefer this was always a runtime option, but the
> current design of the IRBuilder class is basing this off a template
> parameter.
> But in practice, is this a bad idea? What are you concerned about? The
> missing names triggering some different behavior in the backend which
> results in a bug that only shows up in Release-Asserts mode?

Mmm... I guess I can't come up with any real-world cases where this
actually makes a difference, assuming we maintain the invariant that
instruction names don't affect compiler behavior.  The one thing I can
think of is that if someone were expecting the output to be identical
between all kinds of builds, it might be a bit non-obvious why the
output differs.


More information about the cfe-commits mailing list