[PATCH] D97338: [Orc] Use extensible RTTI for the orc::ObjectLayer class hierarchy
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 25 09:27:53 PST 2021
dblaikie added a comment.
In D97338#2587980 <https://reviews.llvm.org/D97338#2587980>, @sgraenitz wrote:
> Thanks for having a look. Yes, extensibility is a good point. I switched it to the ExtensibleRTTI implementation and it works well. It's the first use-case in LLVM so far: https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html#rtti-for-open-class-hierarchies
>
> I have to admit I am not very happy with the CRTP approach in there.
Could you describe more what you find off-putting about it?
> I hacked forward a bit to look for an alternative and it is possible: https://reviews.llvm.org/differential/diff/326409/#change-EaiHppkLE6Ki, but it's not in a state where it could land any time soon and I don't have the capacity to get it ready for review now.
This alternative, at least, looks like it uses an extra non-static member variable, compared to the original use of a static member. That's a fairly significant tradeoff/cost to add in terms of extra size to every derived object.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97338/new/
https://reviews.llvm.org/D97338
More information about the llvm-commits
mailing list