forked from OSchip/llvm-project
[CallSite removal][TargetTransformInfoImpl] Replace CallSite with CallBase. NFC
This commit is contained in:
parent
c08af2c11a
commit
daadb48553
|
@ -17,7 +17,6 @@
|
|||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/Analysis/VectorUtils.h"
|
||||
#include "llvm/IR/CallSite.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/GetElementPtrTypeIterator.h"
|
||||
|
@ -796,8 +795,8 @@ public:
|
|||
unsigned getUserCost(const User *U, ArrayRef<const Value *> Operands) {
|
||||
auto *TargetTTI = static_cast<T *>(this);
|
||||
|
||||
if (auto CS = ImmutableCallSite(U)) {
|
||||
const Function *F = CS.getCalledFunction();
|
||||
if (const auto *CB = dyn_cast<CallBase>(U)) {
|
||||
const Function *F = CB->getCalledFunction();
|
||||
if (F) {
|
||||
FunctionType *FTy = F->getFunctionType();
|
||||
if (Intrinsic::ID IID = F->getIntrinsicID()) {
|
||||
|
@ -811,7 +810,7 @@ public:
|
|||
|
||||
return TTI::TCC_Basic * (FTy->getNumParams() + 1);
|
||||
}
|
||||
return TTI::TCC_Basic * (CS.arg_size() + 1);
|
||||
return TTI::TCC_Basic * (CB->arg_size() + 1);
|
||||
}
|
||||
|
||||
Type *Ty = U->getType();
|
||||
|
|
|
@ -246,8 +246,7 @@ void SystemZTTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
|
|||
for (auto &BB : L->blocks())
|
||||
for (auto &I : *BB) {
|
||||
if (isa<CallInst>(&I) || isa<InvokeInst>(&I)) {
|
||||
ImmutableCallSite CS(&I);
|
||||
if (const Function *F = CS.getCalledFunction()) {
|
||||
if (const Function *F = cast<CallBase>(I).getCalledFunction()) {
|
||||
if (isLoweredToCall(F))
|
||||
HasCall = true;
|
||||
if (F->getIntrinsicID() == Intrinsic::memcpy ||
|
||||
|
|
Loading…
Reference in New Issue