diff options
| author | Philip Reames <listmail@philipreames.com> | 2016-04-12 18:05:10 +0000 |
|---|---|---|
| committer | Philip Reames <listmail@philipreames.com> | 2016-04-12 18:05:10 +0000 |
| commit | 92d1f0cb6d4f66a285e3e85bfc2d55fb96b16ae9 (patch) | |
| tree | d39c5157d9a7c5adc3b1f8cb5418a59dc3ce8647 /llvm/lib/IR/Statepoint.cpp | |
| parent | e6a0a23e0883a2252035ad238891992ae90140c2 (diff) | |
| download | bcm5719-llvm-92d1f0cb6d4f66a285e3e85bfc2d55fb96b16ae9.tar.gz bcm5719-llvm-92d1f0cb6d4f66a285e3e85bfc2d55fb96b16ae9.zip | |
Introduce an GCRelocateInst class [NFC]
Previously, we were using isGCRelocate predicates. Using a subclass of IntrinsicInst is far more idiomatic. The refactoring also enables a couple of minor simplifications and code sharing.
llvm-svn: 266098
Diffstat (limited to 'llvm/lib/IR/Statepoint.cpp')
| -rw-r--r-- | llvm/lib/IR/Statepoint.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/IR/Statepoint.cpp b/llvm/lib/IR/Statepoint.cpp index 13e8c6312a6..63be1e780d8 100644 --- a/llvm/lib/IR/Statepoint.cpp +++ b/llvm/lib/IR/Statepoint.cpp @@ -45,13 +45,7 @@ bool llvm::isGCRelocate(ImmutableCallSite CS) { } bool llvm::isGCResult(ImmutableCallSite CS) { - if (auto *F = getCalledFunction(CS)) - return F->getIntrinsicID() == Intrinsic::experimental_gc_result; - return false; -} - -bool llvm::isGCResult(const Value *V) { - return isGCResult(ImmutableCallSite(V)); + return CS.getInstruction() && isa<GCResultInst>(CS.getInstruction()); } bool llvm::isStatepointDirectiveAttr(Attribute Attr) { |

