diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2019-02-11 07:51:44 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2019-02-11 07:51:44 +0000 |
commit | 751d95fb9b3d66731eca0a17bcd7392ca96bb8d9 (patch) | |
tree | 7c1a2c76efcb97119c0ce19712af9e18f89f98b0 /llvm/lib/Analysis/InstructionSimplify.cpp | |
parent | 3160734af13ba9797c82ce98be75b63db0c37c50 (diff) | |
download | llvm-751d95fb9b3d66731eca0a17bcd7392ca96bb8d9.zip llvm-751d95fb9b3d66731eca0a17bcd7392ca96bb8d9.tar.gz llvm-751d95fb9b3d66731eca0a17bcd7392ca96bb8d9.tar.bz2 |
[CallSite removal] Migrate ConstantFolding APIs and implementation to
`CallBase`.
Users have been updated. You can see how to update any out-of-tree
usages: pass `cast<CallBase>(CS.getInstruction())`.
llvm-svn: 353661
Diffstat (limited to 'llvm/lib/Analysis/InstructionSimplify.cpp')
-rw-r--r-- | llvm/lib/Analysis/InstructionSimplify.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index c83d62f..5145e27 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -5166,7 +5166,7 @@ static Value *SimplifyCall(ImmutableCallSite CS, Value *V, IterTy ArgBegin, if (Value *Ret = simplifyIntrinsic(F, ArgBegin, ArgEnd, Q)) return Ret; - if (!canConstantFoldCallTo(CS, F)) + if (!canConstantFoldCallTo(cast<CallBase>(CS.getInstruction()), F)) return nullptr; SmallVector<Constant *, 4> ConstantArgs; @@ -5178,7 +5178,8 @@ static Value *SimplifyCall(ImmutableCallSite CS, Value *V, IterTy ArgBegin, ConstantArgs.push_back(C); } - return ConstantFoldCall(CS, F, ConstantArgs, Q.TLI); + return ConstantFoldCall(cast<CallBase>(CS.getInstruction()), F, ConstantArgs, + Q.TLI); } Value *llvm::SimplifyCall(ImmutableCallSite CS, Value *V, |