summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Statepoint.cpp
diff options
context:
space:
mode:
authorManuel Jacob <me@manueljacob.de>2016-01-05 04:03:00 +0000
committerManuel Jacob <me@manueljacob.de>2016-01-05 04:03:00 +0000
commit83eefa6d2072af46c07b505991462c4c03d0aa77 (patch)
treede4b903360c29301a68bd3f66a30f706eed4783a /llvm/lib/IR/Statepoint.cpp
parent5cd09ade383557a2ff2ad828ad3e00e024cef131 (diff)
downloadbcm5719-llvm-83eefa6d2072af46c07b505991462c4c03d0aa77.tar.gz
bcm5719-llvm-83eefa6d2072af46c07b505991462c4c03d0aa77.zip
[Statepoints] Refactor GCRelocateOperands into an intrinsic wrapper. NFC.
Summary: This commit renames GCRelocateOperands to GCRelocateInst and makes it an intrinsic wrapper, similar to e.g. MemCpyInst. Also, all users of GCRelocateOperands were changed to use the new intrinsic wrapper instead. Reviewers: sanjoy, reames Subscribers: reames, sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D15762 llvm-svn: 256811
Diffstat (limited to 'llvm/lib/IR/Statepoint.cpp')
-rw-r--r--llvm/lib/IR/Statepoint.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/llvm/lib/IR/Statepoint.cpp b/llvm/lib/IR/Statepoint.cpp
index d45c1883ef9..27a990eaff8 100644
--- a/llvm/lib/IR/Statepoint.cpp
+++ b/llvm/lib/IR/Statepoint.cpp
@@ -40,20 +40,7 @@ bool llvm::isStatepoint(const Value &inst) {
}
bool llvm::isGCRelocate(const ImmutableCallSite &CS) {
- if (!CS.getInstruction()) {
- // This is not a call site
- return false;
- }
-
- return isGCRelocate(CS.getInstruction());
-}
-bool llvm::isGCRelocate(const Value *inst) {
- if (const CallInst *call = dyn_cast<CallInst>(inst)) {
- if (const Function *F = call->getCalledFunction()) {
- return F->getIntrinsicID() == Intrinsic::experimental_gc_relocate;
- }
- }
- return false;
+ return CS.getInstruction() && isa<GCRelocateInst>(CS.getInstruction());
}
bool llvm::isGCResult(const ImmutableCallSite &CS) {
OpenPOWER on IntegriCloud