diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2020-07-10 00:00:26 +0300 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2020-07-10 00:02:07 +0300 |
commit | c2a61ef3885019c5e0444d8789de63e1ce4d5003 (patch) | |
tree | e42e63e85ed5c2c922477655b0fa8abb81ad198b /llvm/lib/IR/Function.cpp | |
parent | 98eec7700c3f397283a3937b1d3ddfe4e6d3b910 (diff) | |
download | llvm-c2a61ef3885019c5e0444d8789de63e1ce4d5003.zip llvm-c2a61ef3885019c5e0444d8789de63e1ce4d5003.tar.gz llvm-c2a61ef3885019c5e0444d8789de63e1ce4d5003.tar.bz2 |
Revert "[CallGraph] Ignore callback uses"
This likely has broken test/Transforms/Attributor/IPConstantProp/ tests.
http://45.33.8.238/linux/22502/step_12.txt
This reverts commit 205dc0922d5f7305226f7457fcbcb4224c92530c.
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 995bc40..0ec0cce 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -20,7 +20,6 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" -#include "llvm/IR/AbstractCallSite.h" #include "llvm/IR/Argument.h" #include "llvm/IR/Attributes.h" #include "llvm/IR/BasicBlock.h" @@ -1485,18 +1484,12 @@ Optional<Function *> Intrinsic::remangleIntrinsicFunction(Function *F) { } /// hasAddressTaken - returns true if there are any uses of this function -/// other than direct calls or invokes to it. Optionally ignores callback -/// uses. -bool Function::hasAddressTaken(const User **PutOffender, - bool IgnoreCallbackUses) const { +/// other than direct calls or invokes to it. +bool Function::hasAddressTaken(const User* *PutOffender) const { for (const Use &U : uses()) { const User *FU = U.getUser(); if (isa<BlockAddress>(FU)) continue; - - if (IgnoreCallbackUses && AbstractCallSite(&U)) - continue; - const auto *Call = dyn_cast<CallBase>(FU); if (!Call) { if (PutOffender) |