diff options
Diffstat (limited to 'contrib/llvm/lib/IR/Statepoint.cpp')
-rw-r--r-- | contrib/llvm/lib/IR/Statepoint.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/contrib/llvm/lib/IR/Statepoint.cpp b/contrib/llvm/lib/IR/Statepoint.cpp index 83ee611..27a990e 100644 --- a/contrib/llvm/lib/IR/Statepoint.cpp +++ b/contrib/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) { @@ -67,10 +54,7 @@ bool llvm::isGCResult(const ImmutableCallSite &CS) { bool llvm::isGCResult(const Value *inst) { if (const CallInst *call = dyn_cast<CallInst>(inst)) { if (Function *F = call->getCalledFunction()) { - return (F->getIntrinsicID() == Intrinsic::experimental_gc_result_int || - F->getIntrinsicID() == Intrinsic::experimental_gc_result_float || - F->getIntrinsicID() == Intrinsic::experimental_gc_result_ptr || - F->getIntrinsicID() == Intrinsic::experimental_gc_result); + return F->getIntrinsicID() == Intrinsic::experimental_gc_result; } } return false; |