aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2019-02-11 07:42:30 +0000
committerChandler Carruth <chandlerc@gmail.com>2019-02-11 07:42:30 +0000
commit3160734af13ba9797c82ce98be75b63db0c37c50 (patch)
tree1e7a1df34dd1bef41f11dd57f5bf520d909d06bf /llvm/lib/Transforms/Utils/Local.cpp
parent5b1beda001acdd389ac8881a93883fd959ca7f28 (diff)
downloadllvm-3160734af13ba9797c82ce98be75b63db0c37c50.zip
llvm-3160734af13ba9797c82ce98be75b63db0c37c50.tar.gz
llvm-3160734af13ba9797c82ce98be75b63db0c37c50.tar.bz2
[CallSite removal] Migrate the statepoint GC infrastructure to use the
`CallBase` class rather than `CallSite` wrappers. I pushed this change down through most of the statepoint infrastructure, completely removing the use of CallSite where I could reasonably do so. I ended up making a couple of cut-points: generic call handling (instcombine, TLI, SDAG). As soon as it hit truly generic handling with users outside the immediate code, I simply transitioned into or out of a `CallSite` to make this a reasonable sized chunk. Differential Revision: https://reviews.llvm.org/D56122 llvm-svn: 353660
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 933a69c..b7e6966 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -2462,12 +2462,12 @@ unsigned llvm::replaceDominatedUsesWith(Value *From, Value *To,
return ::replaceDominatedUsesWith(From, To, BB, ProperlyDominates);
}
-bool llvm::callsGCLeafFunction(ImmutableCallSite CS,
+bool llvm::callsGCLeafFunction(const CallBase *Call,
const TargetLibraryInfo &TLI) {
// Check if the function is specifically marked as a gc leaf function.
- if (CS.hasFnAttr("gc-leaf-function"))
+ if (Call->hasFnAttr("gc-leaf-function"))
return true;
- if (const Function *F = CS.getCalledFunction()) {
+ if (const Function *F = Call->getCalledFunction()) {
if (F->hasFnAttribute("gc-leaf-function"))
return true;
@@ -2481,7 +2481,7 @@ bool llvm::callsGCLeafFunction(ImmutableCallSite CS,
// marked as 'gc-leaf-function.' All available Libcalls are
// GC-leaf.
LibFunc LF;
- if (TLI.getLibFunc(CS, LF)) {
+ if (TLI.getLibFunc(ImmutableCallSite(Call), LF)) {
return TLI.has(LF);
}