[patch] Drop support for mangling unnamed globals
rafael.espindola at gmail.com
Sun Mar 23 21:16:57 PDT 2014
On 5 February 2014 13:53, Chris Lattner <clattner at apple.com> wrote:
> I generally like removing old dead code, but I'm nervous about this one.
> This is really redefining what is valid IR. How about you start by adding
> an assert that the name is not null, see if anyone complains over the course
> of a couple of weeks, and if noone does, then take it out.
> If/when this goes in, this will need a release note and update to LangRef.
I chatted about this on the last social with Nick. He convinced me
that unnamed global are a reasonable feature. What is not is the need
to create a name for them. The use case is to avoid creating names at
all when they are not needed. This is currently not the case since
MCSymbols are always named.
My idea is now to
* Keep the feature as in at the IR level.
* Add support for unnamed MCSymbols. This would be nice even for MC
itself, so that we don't need to create names for local branch targets
that are never printed. The names would be created lazily if we hit a
case that needs one. Examples are the MCSymbol ending up in the symbol
table or we print it to an assembly file.
* Map unnamed globals to unnamed symbols.
This is not something I will be working in the short term, but it is
something I would like to get done eventually.
More information about the llvm-commits