[PATCH] D107645: [GlobalDCE] Handle relative pointers in VFE (for Swift vtables)
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 27 12:03:16 PDT 2021
fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.
LGTM, thanks for splitting this off.
Please wait a couple of days with committing, in case there are additional comments/concerns.
================
Comment at: llvm/lib/Analysis/TypeMetadataUtils.cpp:196
+ if (Operand1TargetGlobal != TopLevelGlobal)
+ return nullptr;
+
----------------
kubamracek wrote:
> fhahn wrote:
> > Could you also add a test case for that?
> That's tough without <https://reviews.llvm.org/D108741>, because returning "not found" from this function is currently going to make GlobalDCE be *more aggressive* and remove that slot from the vtable. Writing a test for this behavior is... "weird" because that behavior sounds like a bug (to be fixed with <https://reviews.llvm.org/D108741>).
It would still provide coverage for that code path.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107645/new/
https://reviews.llvm.org/D107645
More information about the llvm-commits
mailing list