[PATCH] D96087: Option to ignore llvm[.compiler].used uses in hasAddressTaken()
Madhur Amilkanthwar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 9 10:54:10 PST 2021
madhur13490 added inline comments.
================
Comment at: llvm/lib/Analysis/CallGraph.cpp:85
+ /* IgnoreAssumeLikeCalls */ true,
+ /* IngoreLLVMUsed */ true))
ExternalCallingNode->addCalledFunction(nullptr, Node);
----------------
Typo: Ingore
================
Comment at: llvm/lib/IR/Function.cpp:1617
+ (GV->getName().equals("llvm.compiler.used") ||
+ GV->getName().equals("llvm.used"));
+ return false;
----------------
Can you please add a test which has non-bitcast value of function pointers? Something like below;
```
@llvm.used = appending global [2 x float()*] [void()* @foo, void()* @bar]
```
IIRC, the above simple cast to GlobalVariable is not sufficient in this case. You need to handle it with some more extra checks.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96087/new/
https://reviews.llvm.org/D96087
More information about the llvm-commits
mailing list