[PATCH] D81911: [IR] Fix getBaseObject for GlobalAlias-to-GlobalIFunc

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 15:56:12 PDT 2020


tejohnson added a comment.

Odd that it is only exposed through the alias summary generation. There are lots of places that call getBaseObject, but maybe not as many as I assumed. If it is only reproducible that way a test based on that is fine with me.



================
Comment at: llvm/lib/IR/Globals.cpp:447
     return GO;
+  if (auto *GI = dyn_cast<GlobalIFunc>(C))
+    return findBaseObject(GI->getOperand(0), Aliases);
----------------
Would it make more sense to just generalize the GlobalAlias handling already here to handle all GlobalIndirectSymbols? And specifically, it seems to be looking for cycles (via the Aliases DenseSet parameter) - does that make sense for IFuncs too? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81911





More information about the llvm-commits mailing list