mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-04 18:38:05 +00:00
ArrayRefize some code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a4dd8d6732
commit
3853f74aba
@ -567,7 +567,7 @@ public:
|
|||||||
SDValue getNode(unsigned Opcode, DebugLoc DL, EVT VT,
|
SDValue getNode(unsigned Opcode, DebugLoc DL, EVT VT,
|
||||||
const SDValue *Ops, unsigned NumOps);
|
const SDValue *Ops, unsigned NumOps);
|
||||||
SDValue getNode(unsigned Opcode, DebugLoc DL,
|
SDValue getNode(unsigned Opcode, DebugLoc DL,
|
||||||
const std::vector<EVT> &ResultTys,
|
ArrayRef<EVT> ResultTys,
|
||||||
const SDValue *Ops, unsigned NumOps);
|
const SDValue *Ops, unsigned NumOps);
|
||||||
SDValue getNode(unsigned Opcode, DebugLoc DL, const EVT *VTs, unsigned NumVTs,
|
SDValue getNode(unsigned Opcode, DebugLoc DL, const EVT *VTs, unsigned NumVTs,
|
||||||
const SDValue *Ops, unsigned NumOps);
|
const SDValue *Ops, unsigned NumOps);
|
||||||
@ -831,7 +831,7 @@ public:
|
|||||||
MachineSDNode *getMachineNode(unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2,
|
MachineSDNode *getMachineNode(unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2,
|
||||||
EVT VT3, EVT VT4, const SDValue *Ops, unsigned NumOps);
|
EVT VT3, EVT VT4, const SDValue *Ops, unsigned NumOps);
|
||||||
MachineSDNode *getMachineNode(unsigned Opcode, DebugLoc dl,
|
MachineSDNode *getMachineNode(unsigned Opcode, DebugLoc dl,
|
||||||
const std::vector<EVT> &ResultTys, const SDValue *Ops,
|
ArrayRef<EVT> ResultTys, const SDValue *Ops,
|
||||||
unsigned NumOps);
|
unsigned NumOps);
|
||||||
MachineSDNode *getMachineNode(unsigned Opcode, DebugLoc dl, SDVTList VTs,
|
MachineSDNode *getMachineNode(unsigned Opcode, DebugLoc dl, SDVTList VTs,
|
||||||
const SDValue *Ops, unsigned NumOps);
|
const SDValue *Ops, unsigned NumOps);
|
||||||
|
@ -4704,7 +4704,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
|
|||||||
}
|
}
|
||||||
|
|
||||||
SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL,
|
SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL,
|
||||||
const std::vector<EVT> &ResultTys,
|
ArrayRef<EVT> ResultTys,
|
||||||
const SDValue *Ops, unsigned NumOps) {
|
const SDValue *Ops, unsigned NumOps) {
|
||||||
return getNode(Opcode, DL, getVTList(&ResultTys[0], ResultTys.size()),
|
return getNode(Opcode, DL, getVTList(&ResultTys[0], ResultTys.size()),
|
||||||
Ops, NumOps);
|
Ops, NumOps);
|
||||||
@ -5356,7 +5356,7 @@ SelectionDAG::getMachineNode(unsigned Opcode, DebugLoc dl, EVT VT1,
|
|||||||
|
|
||||||
MachineSDNode *
|
MachineSDNode *
|
||||||
SelectionDAG::getMachineNode(unsigned Opcode, DebugLoc dl,
|
SelectionDAG::getMachineNode(unsigned Opcode, DebugLoc dl,
|
||||||
const std::vector<EVT> &ResultTys,
|
ArrayRef<EVT> ResultTys,
|
||||||
const SDValue *Ops, unsigned NumOps) {
|
const SDValue *Ops, unsigned NumOps) {
|
||||||
SDVTList VTs = getVTList(&ResultTys[0], ResultTys.size());
|
SDVTList VTs = getVTList(&ResultTys[0], ResultTys.size());
|
||||||
return getMachineNode(Opcode, dl, VTs, Ops, NumOps);
|
return getMachineNode(Opcode, dl, VTs, Ops, NumOps);
|
||||||
|
@ -1671,9 +1671,7 @@ SDNode *SelectionDAGISel::Select_INLINEASM(SDNode *N) {
|
|||||||
std::vector<SDValue> Ops(N->op_begin(), N->op_end());
|
std::vector<SDValue> Ops(N->op_begin(), N->op_end());
|
||||||
SelectInlineAsmMemoryOperands(Ops);
|
SelectInlineAsmMemoryOperands(Ops);
|
||||||
|
|
||||||
std::vector<EVT> VTs;
|
EVT VTs[] = { MVT::Other, MVT::Glue };
|
||||||
VTs.push_back(MVT::Other);
|
|
||||||
VTs.push_back(MVT::Glue);
|
|
||||||
SDValue New = CurDAG->getNode(ISD::INLINEASM, N->getDebugLoc(),
|
SDValue New = CurDAG->getNode(ISD::INLINEASM, N->getDebugLoc(),
|
||||||
VTs, &Ops[0], Ops.size());
|
VTs, &Ops[0], Ops.size());
|
||||||
New->setNodeId(-1);
|
New->setNodeId(-1);
|
||||||
|
@ -3195,9 +3195,7 @@ SDNode *ARMDAGToDAGISel::Select(SDNode *N) {
|
|||||||
|
|
||||||
// Store exclusive double return a i32 value which is the return status
|
// Store exclusive double return a i32 value which is the return status
|
||||||
// of the issued store.
|
// of the issued store.
|
||||||
std::vector<EVT> ResTys;
|
EVT ResTys[] = { MVT::i32, MVT::Other };
|
||||||
ResTys.push_back(MVT::i32);
|
|
||||||
ResTys.push_back(MVT::Other);
|
|
||||||
|
|
||||||
bool isThumb = Subtarget->isThumb() && Subtarget->hasThumb2();
|
bool isThumb = Subtarget->isThumb() && Subtarget->hasThumb2();
|
||||||
// Place arguments in the right order.
|
// Place arguments in the right order.
|
||||||
|
@ -716,16 +716,15 @@ NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
|
|||||||
for (unsigned i=0,e=Ins.size(); i!=e; ++i) {
|
for (unsigned i=0,e=Ins.size(); i!=e; ++i) {
|
||||||
unsigned sz = Ins[i].VT.getSizeInBits();
|
unsigned sz = Ins[i].VT.getSizeInBits();
|
||||||
if (Ins[i].VT.isInteger() && (sz < 8)) sz = 8;
|
if (Ins[i].VT.isInteger() && (sz < 8)) sz = 8;
|
||||||
std::vector<EVT> LoadRetVTs;
|
EVT LoadRetVTs[] = { Ins[i].VT, MVT::Other, MVT::Glue };
|
||||||
LoadRetVTs.push_back(Ins[i].VT);
|
SDValue LoadRetOps[] = {
|
||||||
LoadRetVTs.push_back(MVT::Other); LoadRetVTs.push_back(MVT::Glue);
|
Chain,
|
||||||
std::vector<SDValue> LoadRetOps;
|
DAG.getConstant(1, MVT::i32),
|
||||||
LoadRetOps.push_back(Chain);
|
DAG.getConstant(resoffset, MVT::i32),
|
||||||
LoadRetOps.push_back(DAG.getConstant(1, MVT::i32));
|
InFlag
|
||||||
LoadRetOps.push_back(DAG.getConstant(resoffset, MVT::i32));
|
};
|
||||||
LoadRetOps.push_back(InFlag);
|
|
||||||
SDValue retval = DAG.getNode(NVPTXISD::LoadParam, dl, LoadRetVTs,
|
SDValue retval = DAG.getNode(NVPTXISD::LoadParam, dl, LoadRetVTs,
|
||||||
&LoadRetOps[0], LoadRetOps.size());
|
LoadRetOps, array_lengthof(LoadRetOps));
|
||||||
Chain = retval.getValue(1);
|
Chain = retval.getValue(1);
|
||||||
InFlag = retval.getValue(2);
|
InFlag = retval.getValue(2);
|
||||||
InVals.push_back(retval);
|
InVals.push_back(retval);
|
||||||
@ -750,16 +749,15 @@ NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
|
|||||||
}
|
}
|
||||||
std::vector<SDValue> tempRetVals;
|
std::vector<SDValue> tempRetVals;
|
||||||
for (unsigned j=0; j<numelems; ++j) {
|
for (unsigned j=0; j<numelems; ++j) {
|
||||||
std::vector<EVT> MoveRetVTs;
|
EVT MoveRetVTs[] = { elemtype, MVT::Other, MVT::Glue };
|
||||||
MoveRetVTs.push_back(elemtype);
|
SDValue MoveRetOps[] = {
|
||||||
MoveRetVTs.push_back(MVT::Other); MoveRetVTs.push_back(MVT::Glue);
|
Chain,
|
||||||
std::vector<SDValue> MoveRetOps;
|
DAG.getConstant(0, MVT::i32),
|
||||||
MoveRetOps.push_back(Chain);
|
DAG.getConstant(paramNum, MVT::i32),
|
||||||
MoveRetOps.push_back(DAG.getConstant(0, MVT::i32));
|
InFlag
|
||||||
MoveRetOps.push_back(DAG.getConstant(paramNum, MVT::i32));
|
};
|
||||||
MoveRetOps.push_back(InFlag);
|
|
||||||
SDValue retval = DAG.getNode(NVPTXISD::LoadParam, dl, MoveRetVTs,
|
SDValue retval = DAG.getNode(NVPTXISD::LoadParam, dl, MoveRetVTs,
|
||||||
&MoveRetOps[0], MoveRetOps.size());
|
MoveRetOps, array_lengthof(MoveRetOps));
|
||||||
Chain = retval.getValue(1);
|
Chain = retval.getValue(1);
|
||||||
InFlag = retval.getValue(2);
|
InFlag = retval.getValue(2);
|
||||||
tempRetVals.push_back(retval);
|
tempRetVals.push_back(retval);
|
||||||
|
@ -4786,12 +4786,13 @@ SDValue PPCTargetLowering::LowerFLT_ROUNDS_(SDValue Op,
|
|||||||
MachineFunction &MF = DAG.getMachineFunction();
|
MachineFunction &MF = DAG.getMachineFunction();
|
||||||
EVT VT = Op.getValueType();
|
EVT VT = Op.getValueType();
|
||||||
EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
|
EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
|
||||||
std::vector<EVT> NodeTys;
|
|
||||||
SDValue MFFSreg, InFlag;
|
SDValue MFFSreg, InFlag;
|
||||||
|
|
||||||
// Save FP Control Word to register
|
// Save FP Control Word to register
|
||||||
NodeTys.push_back(MVT::f64); // return register
|
EVT NodeTys[] = {
|
||||||
NodeTys.push_back(MVT::Glue); // unused in this context
|
MVT::f64, // return register
|
||||||
|
MVT::Glue // unused in this context
|
||||||
|
};
|
||||||
SDValue Chain = DAG.getNode(PPCISD::MFFS, dl, NodeTys, &InFlag, 0);
|
SDValue Chain = DAG.getNode(PPCISD::MFFS, dl, NodeTys, &InFlag, 0);
|
||||||
|
|
||||||
// Save FP register to stack slot
|
// Save FP register to stack slot
|
||||||
@ -5408,9 +5409,7 @@ SDValue PPCTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
|
|||||||
Op.getOperand(3), // RHS
|
Op.getOperand(3), // RHS
|
||||||
DAG.getConstant(CompareOpc, MVT::i32)
|
DAG.getConstant(CompareOpc, MVT::i32)
|
||||||
};
|
};
|
||||||
std::vector<EVT> VTs;
|
EVT VTs[] = { Op.getOperand(2).getValueType(), MVT::Glue };
|
||||||
VTs.push_back(Op.getOperand(2).getValueType());
|
|
||||||
VTs.push_back(MVT::Glue);
|
|
||||||
SDValue CompNode = DAG.getNode(PPCISD::VCMPo, dl, VTs, Ops, 3);
|
SDValue CompNode = DAG.getNode(PPCISD::VCMPo, dl, VTs, Ops, 3);
|
||||||
|
|
||||||
// Now that we have the comparison, emit a copy from the CR to a GPR.
|
// Now that we have the comparison, emit a copy from the CR to a GPR.
|
||||||
@ -6466,14 +6465,12 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,
|
|||||||
bool BranchOnWhenPredTrue = (CC == ISD::SETEQ) ^ (Val == 0);
|
bool BranchOnWhenPredTrue = (CC == ISD::SETEQ) ^ (Val == 0);
|
||||||
|
|
||||||
// Create the PPCISD altivec 'dot' comparison node.
|
// Create the PPCISD altivec 'dot' comparison node.
|
||||||
std::vector<EVT> VTs;
|
|
||||||
SDValue Ops[] = {
|
SDValue Ops[] = {
|
||||||
LHS.getOperand(2), // LHS of compare
|
LHS.getOperand(2), // LHS of compare
|
||||||
LHS.getOperand(3), // RHS of compare
|
LHS.getOperand(3), // RHS of compare
|
||||||
DAG.getConstant(CompareOpc, MVT::i32)
|
DAG.getConstant(CompareOpc, MVT::i32)
|
||||||
};
|
};
|
||||||
VTs.push_back(LHS.getOperand(2).getValueType());
|
EVT VTs[] = { LHS.getOperand(2).getValueType(), MVT::Glue };
|
||||||
VTs.push_back(MVT::Glue);
|
|
||||||
SDValue CompNode = DAG.getNode(PPCISD::VCMPo, dl, VTs, Ops, 3);
|
SDValue CompNode = DAG.getNode(PPCISD::VCMPo, dl, VTs, Ops, 3);
|
||||||
|
|
||||||
// Unpack the result based on how the target uses it.
|
// Unpack the result based on how the target uses it.
|
||||||
|
@ -955,9 +955,7 @@ static SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG) {
|
|||||||
// Get the condition flag.
|
// Get the condition flag.
|
||||||
SDValue CompareFlag;
|
SDValue CompareFlag;
|
||||||
if (LHS.getValueType() == MVT::i32) {
|
if (LHS.getValueType() == MVT::i32) {
|
||||||
std::vector<EVT> VTs;
|
EVT VTs[] = { MVT::i32, MVT::Glue };
|
||||||
VTs.push_back(MVT::i32);
|
|
||||||
VTs.push_back(MVT::Glue);
|
|
||||||
SDValue Ops[2] = { LHS, RHS };
|
SDValue Ops[2] = { LHS, RHS };
|
||||||
CompareFlag = DAG.getNode(SPISD::CMPICC, dl, VTs, Ops, 2).getValue(1);
|
CompareFlag = DAG.getNode(SPISD::CMPICC, dl, VTs, Ops, 2).getValue(1);
|
||||||
if (SPCC == ~0U) SPCC = IntCondCCodeToICC(CC);
|
if (SPCC == ~0U) SPCC = IntCondCCodeToICC(CC);
|
||||||
@ -986,9 +984,8 @@ static SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) {
|
|||||||
|
|
||||||
SDValue CompareFlag;
|
SDValue CompareFlag;
|
||||||
if (LHS.getValueType() == MVT::i32) {
|
if (LHS.getValueType() == MVT::i32) {
|
||||||
std::vector<EVT> VTs;
|
// subcc returns a value
|
||||||
VTs.push_back(LHS.getValueType()); // subcc returns a value
|
EVT VTs[] = { LHS.getValueType(), MVT::Glue };
|
||||||
VTs.push_back(MVT::Glue);
|
|
||||||
SDValue Ops[2] = { LHS, RHS };
|
SDValue Ops[2] = { LHS, RHS };
|
||||||
CompareFlag = DAG.getNode(SPISD::CMPICC, dl, VTs, Ops, 2).getValue(1);
|
CompareFlag = DAG.getNode(SPISD::CMPICC, dl, VTs, Ops, 2).getValue(1);
|
||||||
Opc = SPISD::SELECT_ICC;
|
Opc = SPISD::SELECT_ICC;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user