[PATCH] D107645: [GlobalDCE] Handle relative pointers in VFE (for Swift vtables)
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 25 16:03:27 PDT 2021
kubamracek added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalDCE.cpp:138
+ // Scan the !type metadata on the vtable and also ignore those deps that
+ // have an offset in one of the !type entries.
+ if (auto VTable = dyn_cast<GlobalVariable>(GVU)) {
----------------
fhahn wrote:
> Could you also explain *why* those dependencies can be safely ignored?
This is now removed from the patch, but for completeness, there was a typo in the comment that suggested that the change was ignoring more dependencies compared to the existing code -- that was a typo, the change was actually "keeping" some dependencies as "regular" deps, specifically if they don't have an entry in the !type metadata, therefore they are not a vfunc.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107645/new/
https://reviews.llvm.org/D107645
More information about the llvm-commits
mailing list