[PATCH] D98884: [IR] Ignore bitcasts of function pointers which are only used as callees in callbase instruction

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 01:52:09 PDT 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:2147
+      for (User *BU : U->users())
+        SetCallBaseFastCallingConv(BU);
+      continue;
----------------
madhur13490 wrote:
> rampitec wrote:
> > arsenm wrote:
> > > rampitec wrote:
> > > > I do not see why a user of bitcast must be necessarily a call.
> > > This could be a function in a constant initializer for a global
> > Right, that's what I mean. It could be anything, even a compare.
> Right, now I remember why I had dyn_cast and return in previous diff.
Is there a test where the user is not a bit cast ? If not, please add one, similar for the other places that were changed back to `dyn_cast`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98884



More information about the llvm-commits mailing list