mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Convert one last signature of getNode to take an ArrayRef of SDUse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207376 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
479c81774d
commit
7e1ae6d9e0
@ -607,8 +607,7 @@ public:
|
|||||||
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT,
|
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT,
|
||||||
SDValue N1, SDValue N2, SDValue N3, SDValue N4,
|
SDValue N1, SDValue N2, SDValue N3, SDValue N4,
|
||||||
SDValue N5);
|
SDValue N5);
|
||||||
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT,
|
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT, ArrayRef<SDUse> Ops);
|
||||||
const SDUse *Ops, unsigned NumOps);
|
|
||||||
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT,
|
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT,
|
||||||
ArrayRef<SDValue> Ops);
|
ArrayRef<SDValue> Ops);
|
||||||
SDValue getNode(unsigned Opcode, SDLoc DL,
|
SDValue getNode(unsigned Opcode, SDLoc DL,
|
||||||
|
@ -2277,7 +2277,7 @@ SDValue DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N, unsigned LoOp,
|
|||||||
(!LegalOperations ||
|
(!LegalOperations ||
|
||||||
TLI.isOperationLegalOrCustom(LoOp, N->getValueType(0)))) {
|
TLI.isOperationLegalOrCustom(LoOp, N->getValueType(0)))) {
|
||||||
SDValue Res = DAG.getNode(LoOp, SDLoc(N), N->getValueType(0),
|
SDValue Res = DAG.getNode(LoOp, SDLoc(N), N->getValueType(0),
|
||||||
N->op_begin(), N->getNumOperands());
|
ArrayRef<SDUse>(N->op_begin(), N->op_end()));
|
||||||
return CombineTo(N, Res, Res);
|
return CombineTo(N, Res, Res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2287,7 +2287,7 @@ SDValue DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N, unsigned LoOp,
|
|||||||
(!LegalOperations ||
|
(!LegalOperations ||
|
||||||
TLI.isOperationLegal(HiOp, N->getValueType(1)))) {
|
TLI.isOperationLegal(HiOp, N->getValueType(1)))) {
|
||||||
SDValue Res = DAG.getNode(HiOp, SDLoc(N), N->getValueType(1),
|
SDValue Res = DAG.getNode(HiOp, SDLoc(N), N->getValueType(1),
|
||||||
N->op_begin(), N->getNumOperands());
|
ArrayRef<SDUse>(N->op_begin(), N->op_end()));
|
||||||
return CombineTo(N, Res, Res);
|
return CombineTo(N, Res, Res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2298,7 +2298,7 @@ SDValue DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N, unsigned LoOp,
|
|||||||
// If the two computed results can be simplified separately, separate them.
|
// If the two computed results can be simplified separately, separate them.
|
||||||
if (LoExists) {
|
if (LoExists) {
|
||||||
SDValue Lo = DAG.getNode(LoOp, SDLoc(N), N->getValueType(0),
|
SDValue Lo = DAG.getNode(LoOp, SDLoc(N), N->getValueType(0),
|
||||||
N->op_begin(), N->getNumOperands());
|
ArrayRef<SDUse>(N->op_begin(), N->op_end()));
|
||||||
AddToWorkList(Lo.getNode());
|
AddToWorkList(Lo.getNode());
|
||||||
SDValue LoOpt = combine(Lo.getNode());
|
SDValue LoOpt = combine(Lo.getNode());
|
||||||
if (LoOpt.getNode() && LoOpt.getNode() != Lo.getNode() &&
|
if (LoOpt.getNode() && LoOpt.getNode() != Lo.getNode() &&
|
||||||
@ -2309,7 +2309,7 @@ SDValue DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N, unsigned LoOp,
|
|||||||
|
|
||||||
if (HiExists) {
|
if (HiExists) {
|
||||||
SDValue Hi = DAG.getNode(HiOp, SDLoc(N), N->getValueType(1),
|
SDValue Hi = DAG.getNode(HiOp, SDLoc(N), N->getValueType(1),
|
||||||
N->op_begin(), N->getNumOperands());
|
ArrayRef<SDUse>(N->op_begin(), N->op_end()));
|
||||||
AddToWorkList(Hi.getNode());
|
AddToWorkList(Hi.getNode());
|
||||||
SDValue HiOpt = combine(Hi.getNode());
|
SDValue HiOpt = combine(Hi.getNode());
|
||||||
if (HiOpt.getNode() && HiOpt != Hi &&
|
if (HiOpt.getNode() && HiOpt != Hi &&
|
||||||
|
@ -4799,10 +4799,10 @@ SDValue SelectionDAG::getVAArg(EVT VT, SDLoc dl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL, EVT VT,
|
SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL, EVT VT,
|
||||||
const SDUse *Ops, unsigned NumOps) {
|
ArrayRef<SDUse> Ops) {
|
||||||
switch (NumOps) {
|
switch (Ops.size()) {
|
||||||
case 0: return getNode(Opcode, DL, VT);
|
case 0: return getNode(Opcode, DL, VT);
|
||||||
case 1: return getNode(Opcode, DL, VT, Ops[0]);
|
case 1: return getNode(Opcode, DL, VT, static_cast<const SDValue>(Ops[0]));
|
||||||
case 2: return getNode(Opcode, DL, VT, Ops[0], Ops[1]);
|
case 2: return getNode(Opcode, DL, VT, Ops[0], Ops[1]);
|
||||||
case 3: return getNode(Opcode, DL, VT, Ops[0], Ops[1], Ops[2]);
|
case 3: return getNode(Opcode, DL, VT, Ops[0], Ops[1], Ops[2]);
|
||||||
default: break;
|
default: break;
|
||||||
@ -4810,7 +4810,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL, EVT VT,
|
|||||||
|
|
||||||
// Copy from an SDUse array into an SDValue array for use with
|
// Copy from an SDUse array into an SDValue array for use with
|
||||||
// the regular getNode logic.
|
// the regular getNode logic.
|
||||||
SmallVector<SDValue, 8> NewOps(Ops, Ops + NumOps);
|
SmallVector<SDValue, 8> NewOps(Ops.begin(), Ops.end());
|
||||||
return getNode(Opcode, DL, VT, NewOps);
|
return getNode(Opcode, DL, VT, NewOps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,8 @@ static SDValue ExtractSubVector(SDValue Vec, unsigned IdxVal,
|
|||||||
// If the input is a buildvector just emit a smaller one.
|
// If the input is a buildvector just emit a smaller one.
|
||||||
if (Vec.getOpcode() == ISD::BUILD_VECTOR)
|
if (Vec.getOpcode() == ISD::BUILD_VECTOR)
|
||||||
return DAG.getNode(ISD::BUILD_VECTOR, dl, ResultVT,
|
return DAG.getNode(ISD::BUILD_VECTOR, dl, ResultVT,
|
||||||
Vec->op_begin()+NormalizedIdxVal, ElemsPerChunk);
|
ArrayRef<SDUse>(Vec->op_begin()+NormalizedIdxVal,
|
||||||
|
ElemsPerChunk));
|
||||||
|
|
||||||
SDValue VecIdx = DAG.getIntPtrConstant(NormalizedIdxVal);
|
SDValue VecIdx = DAG.getIntPtrConstant(NormalizedIdxVal);
|
||||||
SDValue Result = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, ResultVT, Vec,
|
SDValue Result = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, ResultVT, Vec,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user