mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 07:24:47 +00:00
Make TargetLowering::getPointerTy() taking DataLayout as an argument
Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: jholewinski, ted, yaron.keren, rafael, llvm-commits Differential Revision: http://reviews.llvm.org/D11028 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -61,14 +61,14 @@ unsigned ARMTTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) {
|
||||
|
||||
if (Src->isVectorTy() && ST->hasNEON() && (ISD == ISD::FP_ROUND ||
|
||||
ISD == ISD::FP_EXTEND)) {
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Src);
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(DL, Src);
|
||||
int Idx = CostTableLookup(NEONFltDblTbl, ISD, LT.second);
|
||||
if (Idx != -1)
|
||||
return LT.first * NEONFltDblTbl[Idx].Cost;
|
||||
}
|
||||
|
||||
EVT SrcTy = TLI->getValueType(Src);
|
||||
EVT DstTy = TLI->getValueType(Dst);
|
||||
EVT SrcTy = TLI->getValueType(DL, Src);
|
||||
EVT DstTy = TLI->getValueType(DL, Dst);
|
||||
|
||||
if (!SrcTy.isSimple() || !DstTy.isSimple())
|
||||
return BaseT::getCastInstrCost(Opcode, Dst, Src);
|
||||
@@ -282,8 +282,8 @@ unsigned ARMTTIImpl::getCmpSelInstrCost(unsigned Opcode, Type *ValTy,
|
||||
{ ISD::SELECT, MVT::v16i1, MVT::v16i64, 100 }
|
||||
};
|
||||
|
||||
EVT SelCondTy = TLI->getValueType(CondTy);
|
||||
EVT SelValTy = TLI->getValueType(ValTy);
|
||||
EVT SelCondTy = TLI->getValueType(DL, CondTy);
|
||||
EVT SelValTy = TLI->getValueType(DL, ValTy);
|
||||
if (SelCondTy.isSimple() && SelValTy.isSimple()) {
|
||||
int Idx = ConvertCostTableLookup(NEONVectorSelectTbl, ISD,
|
||||
SelCondTy.getSimpleVT(),
|
||||
@@ -292,7 +292,7 @@ unsigned ARMTTIImpl::getCmpSelInstrCost(unsigned Opcode, Type *ValTy,
|
||||
return NEONVectorSelectTbl[Idx].Cost;
|
||||
}
|
||||
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(ValTy);
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(DL, ValTy);
|
||||
return LT.first;
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ unsigned ARMTTIImpl::getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index,
|
||||
{ISD::VECTOR_SHUFFLE, MVT::v8i16, 2},
|
||||
{ISD::VECTOR_SHUFFLE, MVT::v16i8, 2}};
|
||||
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Tp);
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(DL, Tp);
|
||||
|
||||
int Idx = CostTableLookup(NEONShuffleTbl, ISD::VECTOR_SHUFFLE, LT.second);
|
||||
if (Idx == -1)
|
||||
@@ -379,7 +379,7 @@ unsigned ARMTTIImpl::getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index,
|
||||
|
||||
{ISD::VECTOR_SHUFFLE, MVT::v16i8, 32}};
|
||||
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Tp);
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(DL, Tp);
|
||||
int Idx =
|
||||
CostTableLookup(NEONAltShuffleTbl, ISD::VECTOR_SHUFFLE, LT.second);
|
||||
if (Idx == -1)
|
||||
@@ -395,7 +395,7 @@ unsigned ARMTTIImpl::getArithmeticInstrCost(
|
||||
TTI::OperandValueProperties Opd2PropInfo) {
|
||||
|
||||
int ISDOpcode = TLI->InstructionOpcodeToISD(Opcode);
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Ty);
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(DL, Ty);
|
||||
|
||||
const unsigned FunctionCallDivCost = 20;
|
||||
const unsigned ReciprocalDivCost = 10;
|
||||
@@ -468,7 +468,7 @@ unsigned ARMTTIImpl::getArithmeticInstrCost(
|
||||
unsigned ARMTTIImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
|
||||
unsigned Alignment,
|
||||
unsigned AddressSpace) {
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Src);
|
||||
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(DL, Src);
|
||||
|
||||
if (Src->isVectorTy() && Alignment != 16 &&
|
||||
Src->getVectorElementType()->isDoubleTy()) {
|
||||
|
Reference in New Issue
Block a user