[PATCH] D108741: [IR][GlobalDCE] Add ability to mark vtable methods as eligible for VFE and avoid eliminating non-eligible vfunc in VFE in GlobalDCE

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 09:00:11 PDT 2021


fhahn 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());
----------------
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?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108741/new/

https://reviews.llvm.org/D108741



More information about the llvm-commits mailing list