[PATCH] D108741: [IR][GlobalDCE] Add ability to mark vtable methods as eligible for VFE and avoid eliminating non-eligible vfunc in VFE in GlobalDCE
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 11 11:54:35 PDT 2021
kubamracek added inline comments.
================
Comment at: llvm/lib/Analysis/ModuleSummaryAnalysis.cpp:518
+ auto VE = dyn_cast<VFEEligibleValue>(I->stripPointerCasts());
+ if (VE) Fn = dyn_cast<Function>(VE->getGlobalValue());
+ else Fn = dyn_cast<Function>(I->stripPointerCasts());
----------------
fhahn wrote:
> kubamracek wrote:
> > fhahn wrote:
> > > Does this need a new test or is this covered by the existing tests?
> > Yes, this is a fix because existing LTO tests that attempt VFE were failing after wrapping the vtable pointer in VFEEligibleValue.
> Hm, I guess what I am missing is where `vfe_eligible` is added to LTO tests. Looks like none are touched by this patch. Or is this a test involving Clang + LTO optimzations?
Exactly, existing Clang LTO tests that use -fvirtual-function-elimination, see CodeGenCXX/vcall-visibility-metadata.cpp in Clang.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108741/new/
https://reviews.llvm.org/D108741
More information about the llvm-commits
mailing list