[PATCH] D39111: Extensible LLVM RTTI
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 09:04:29 PDT 2017
On Fri, Oct 20, 2017 at 4:19 PM Lang Hames via Phabricator <
reviews at reviews.llvm.org> wrote:
> lhames added a comment.
>
> > The virtual call could be removed, perhaps, by having the base class
> hold a non-static member void*...
>
> Oh that's clever. I hadn't thought of that. There is a space trade-off
> though as it would require one char per RTTI object (in addition to the
> current requirement of one BSS char per class).
>
Yeah, totally a space tradeoff for every instance of such classes (& it'd
be one word - a pointer, not just a char, unfortunately :/).
> My current thinking is that open hierarchies are primarily (perhaps only?)
> useful for types that use virtual methods already,
Makes sense.
> and RTTI calls are likely to be rare / non-performance-sensitive for such
> types.
Not sure if that follows, but maybe.
> If it were accepted, my advice was going to be "Use the new system if you
> know you need an open hierarchy, or you know you don't care about
> performance". E.g. libObject. (If it sounds surprising that Object should
> be an open hierarchy, consider Apple's text-based API files: We want them
> to present as symbolic files, but they're unlike any in-tree format. It
> seems reasonable that other users may have similarly quirky formats that
> they still might want to work with llvm-nm, etc.).
>
Might be worth having the libObject change, if that's something you need,
in either this change or a parallel review for demonstrative purposes. I'd
probably like one actual use/need nearby this change to motivate it, so
it's not dead code, etc.
>
>
> Repository:
> rL LLVM
>
> https://reviews.llvm.org/D39111
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171024/73328ff5/attachment.html>
More information about the llvm-commits
mailing list