[PATCH] D139237: CallGraph: Fix IgnoreAssumeLikeCalls option to Function::hasAddressTaken

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 2 16:59:32 PST 2022


arsenm created this revision.
arsenm added reviewers: jdoerfert, rampitec, madhur13490, ggeorgakoudis.
Herald added a subscriber: hiraditya.
Herald added a project: All.
arsenm requested review of this revision.
Herald added subscribers: sstefan1, wdng.
Herald added a project: LLVM.

This was added in 29e2d9461a91b <https://reviews.llvm.org/rG29e2d9461a91b76665139002a5b323fbb1b19d82> and likely never worked in a useful
way.

      

The test added for it fails when converted to opaque pointers, since
the lifetime intrinsic now directly uses the address. The code was
only trying to handle a user indirectly through a bitcast
instruction. That would never have been useful; a bitcast of a global
value would be folded to a ConstantExpr cast.

      

I also don't understand why it was special casing use_empty on the
cast. Relax the check to be either BitCastOperator or
AddrSpaceCastOperator. In practice, BitCastOperator won't appear
today.

      

I believe the change in parallel_deletion_cg_update is a correct
improvement but I didn't fully follow it. .omp_outlined..0 is used in
a constant expression cast to a call which ends up getting deleted.


https://reviews.llvm.org/D139237

Files:
  llvm/lib/IR/Function.cpp
  llvm/test/Analysis/CallGraph/ignore-assumelike-calls.ll
  llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139237.479781.patch
Type: text/x-patch
Size: 6630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221203/57e505fd/attachment.bin>


More information about the llvm-commits mailing list