[llvm] r222205 - IR: Split MDNode into GenericMDNode and MDNodeFwdDecl

Eric Christopher echristo at gmail.com
Tue Nov 18 14:43:44 PST 2014


On Mon Nov 17 2014 at 11:55:46 PM Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

>
> > On 2014 Nov 17, at 20:46, Eric Christopher <echristo at gmail.com> wrote:
> >
> >
> >
> > On Mon Nov 17 2014 at 4:45:03 PM Duncan P. N. Exon Smith <
> dexonsmith at apple.com> wrote:
> > Author: dexonsmith
> > Date: Mon Nov 17 18:37:17 2014
> > New Revision: 222205
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=222205&view=rev
> > Log:
> > IR: Split MDNode into GenericMDNode and MDNodeFwdDecl
> >
> >
> > Small bikeshedding:
>
> Bikeshedding welcome :).
>
> >
> > ReplaceableNDNode maybe?
> >
> > Best name I've been able to come up with so far.
>
> I think "forward declaration" should be in the name somewhere -- or
> "temporary", which was the old name for the concept.
>
>
Forward declaration just has the current use, basically it's anything that
we expect to replace at some point. Temporary could work, but then we'd
want a validation if it was never actually replaced anywhere.


> These metadata are relatively expensive, since they're going to support
> RAUW, so I'd like the name to make it clear that they're not supposed to
> be long-lived.
>
>
Sure.


> I like "forward declaration" because that's the only purpose I know for
> them (well, aside from temporary uniquing hacks).  Also, there won't be
> any support for serializing these (assembly or bitcode), since they're
> not supposed to live that long.  Forward declaration implies that they'll
> be resolved eventually... but maybe it doesn't make it clear enough?
>
>
Yeah, I'm not such a huge fan of that.


> (Essentially, I think "NeedsToBeReplacedMDNode" is more accurate than
> "ReplaceableMDNode".)
>
>
Maybe just go back to Temporary then? It at least has the ephemeral
connotation that you like.


> Note that after-the-split, I plan to implement the RAUW support for both
> this class (whatever it's name) and `ValueAsMetadata` using a helper
> class called `ReplaceableMetadataImpl`, which is pretty similar to the
> name you suggested, but it's an Impl class so its name might not matter
> as much.
>
>
:)

-eric


> Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141118/ef567eac/attachment.html>


More information about the llvm-commits mailing list