[PATCH] D98884: [IR] Add opt-in parameter to hasAddressTaken() to ignore bitcasts callee in callbase instruction

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 11:29:27 PDT 2021


rampitec added inline comments.


================
Comment at: llvm/include/llvm/IR/Function.h:887
   ///
-  bool hasAddressTaken(const User ** = nullptr,
-                       bool IgnoreCallbackUses = false,
+  bool hasAddressTaken(const User ** = nullptr, bool IgnoreCallbackUses = false,
                        bool IgnoreAssumeLikeCalls = false,
----------------
Revert this change, you are not touching this file anymore.


================
Comment at: llvm/test/Analysis/CallGraph/ignore-bitcast-call-argument-callee.ll:12
+; CHECK-NEXT:  CS<{{.*}}> calls function 'bar'
+; CHECK-NEXT:  CS<{{.*}}> calls external node
+
----------------
I do not like that CG does not see a call to foo, but that's probably a separate change.


================
Comment at: llvm/test/Analysis/CallGraph/ignore-bitcast-callees.ll:16
+define internal float @test_bitcast_callees() {
+  %v1 = call float bitcast (i32()* @foo to float()*)()
+  %v2 = fadd float %v1, 1.0
----------------
Can you add a second identical call to the same bitcast? So that you have test where the same bitcast is used twice.


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