mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-26 07:18:15 +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:
@@ -897,8 +897,9 @@ SDValue R600TargetLowering::vectorToVerticalVector(SelectionDAG &DAG,
|
||||
|
||||
for (unsigned i = 0, e = VecVT.getVectorNumElements();
|
||||
i != e; ++i) {
|
||||
Args.push_back(DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, Vector,
|
||||
DAG.getConstant(i, DL, getVectorIdxTy())));
|
||||
Args.push_back(DAG.getNode(
|
||||
ISD::EXTRACT_VECTOR_ELT, DL, EltVT, Vector,
|
||||
DAG.getConstant(i, DL, getVectorIdxTy(DAG.getDataLayout()))));
|
||||
}
|
||||
|
||||
return DAG.getNode(AMDGPUISD::BUILD_VERTICAL_VECTOR, DL, VecVT, Args);
|
||||
@@ -1471,10 +1472,11 @@ SDValue R600TargetLowering::LowerLOAD(SDValue Op, SelectionDAG &DAG) const
|
||||
// Lower loads constant address space global variable loads
|
||||
if (LoadNode->getAddressSpace() == AMDGPUAS::CONSTANT_ADDRESS &&
|
||||
isa<GlobalVariable>(GetUnderlyingObject(
|
||||
LoadNode->getMemOperand()->getValue(), *getDataLayout()))) {
|
||||
LoadNode->getMemOperand()->getValue(), DAG.getDataLayout()))) {
|
||||
|
||||
SDValue Ptr = DAG.getZExtOrTrunc(LoadNode->getBasePtr(), DL,
|
||||
getPointerTy(AMDGPUAS::PRIVATE_ADDRESS));
|
||||
SDValue Ptr = DAG.getZExtOrTrunc(
|
||||
LoadNode->getBasePtr(), DL,
|
||||
getPointerTy(DAG.getDataLayout(), AMDGPUAS::PRIVATE_ADDRESS));
|
||||
Ptr = DAG.getNode(ISD::SRL, DL, MVT::i32, Ptr,
|
||||
DAG.getConstant(2, DL, MVT::i32));
|
||||
return DAG.getNode(AMDGPUISD::REGISTER_LOAD, DL, Op->getVTList(),
|
||||
@@ -1702,7 +1704,8 @@ SDValue R600TargetLowering::LowerFormalArguments(
|
||||
return Chain;
|
||||
}
|
||||
|
||||
EVT R600TargetLowering::getSetCCResultType(LLVMContext &, EVT VT) const {
|
||||
EVT R600TargetLowering::getSetCCResultType(const DataLayout &DL, LLVMContext &,
|
||||
EVT VT) const {
|
||||
if (!VT.isVector())
|
||||
return MVT::i32;
|
||||
return VT.changeVectorElementTypeToInteger();
|
||||
|
||||
Reference in New Issue
Block a user