Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
Show First 20 Lines • Show All 1,455 Lines • ▼ Show 20 Lines | return (MisalignmentProb * P9PipelineFlushEstimate) + | ||||
(AlignmentProb * *Cost.getValue()); | (AlignmentProb * *Cost.getValue()); | ||||
} | } | ||||
// Usually we should not get to this point, but the following is an attempt to | // Usually we should not get to this point, but the following is an attempt to | ||||
// model the cost of legalization. Currently we can only lower intrinsics with | // model the cost of legalization. Currently we can only lower intrinsics with | ||||
// evl but no mask, on Power 9/10. Otherwise, we must scalarize. | // evl but no mask, on Power 9/10. Otherwise, we must scalarize. | ||||
return getMaskedMemoryOpCost(Opcode, Src, Alignment, AddressSpace, CostKind); | return getMaskedMemoryOpCost(Opcode, Src, Alignment, AddressSpace, CostKind); | ||||
} | } | ||||
bool PPCTTIImpl::supportsTailCallFor(const CallBase *CB) const { | |||||
// Subtargets using PC-Relative addressing supported. | |||||
if (ST->isUsingPCRelativeCalls()) | |||||
return true; | |||||
const Function *Callee = CB->getCalledFunction(); | |||||
// Indirect calls and variadic argument functions not supported. | |||||
if (!Callee || Callee->isVarArg()) | |||||
return false; | |||||
const Function *Caller = CB->getCaller(); | |||||
// Support if we can share TOC base. | |||||
return ST->getTargetMachine().shouldAssumeDSOLocal(*Caller->getParent(), | |||||
Callee); | |||||
} |