rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for

something that just glues two nodes together, even if it is
sometimes used for flags.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122310 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-12-21 02:38:05 +00:00
parent 6e90ce21cc
commit f1b4eafbfe
38 changed files with 153 additions and 153 deletions

View File

@ -402,7 +402,7 @@ public:
// null) and that there should be a flag result. // null) and that there should be a flag result.
SDValue getCopyToReg(SDValue Chain, DebugLoc dl, unsigned Reg, SDValue N, SDValue getCopyToReg(SDValue Chain, DebugLoc dl, unsigned Reg, SDValue N,
SDValue Flag) { SDValue Flag) {
SDVTList VTs = getVTList(MVT::Other, MVT::Flag); SDVTList VTs = getVTList(MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, getRegister(Reg, N.getValueType()), N, Flag }; SDValue Ops[] = { Chain, getRegister(Reg, N.getValueType()), N, Flag };
return getNode(ISD::CopyToReg, dl, VTs, Ops, Flag.getNode() ? 4 : 3); return getNode(ISD::CopyToReg, dl, VTs, Ops, Flag.getNode() ? 4 : 3);
} }
@ -410,7 +410,7 @@ public:
// Similar to last getCopyToReg() except parameter Reg is a SDValue // Similar to last getCopyToReg() except parameter Reg is a SDValue
SDValue getCopyToReg(SDValue Chain, DebugLoc dl, SDValue Reg, SDValue N, SDValue getCopyToReg(SDValue Chain, DebugLoc dl, SDValue Reg, SDValue N,
SDValue Flag) { SDValue Flag) {
SDVTList VTs = getVTList(MVT::Other, MVT::Flag); SDVTList VTs = getVTList(MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, Reg, N, Flag }; SDValue Ops[] = { Chain, Reg, N, Flag };
return getNode(ISD::CopyToReg, dl, VTs, Ops, Flag.getNode() ? 4 : 3); return getNode(ISD::CopyToReg, dl, VTs, Ops, Flag.getNode() ? 4 : 3);
} }
@ -426,7 +426,7 @@ public:
// null) and that there should be a flag result. // null) and that there should be a flag result.
SDValue getCopyFromReg(SDValue Chain, DebugLoc dl, unsigned Reg, EVT VT, SDValue getCopyFromReg(SDValue Chain, DebugLoc dl, unsigned Reg, EVT VT,
SDValue Flag) { SDValue Flag) {
SDVTList VTs = getVTList(VT, MVT::Other, MVT::Flag); SDVTList VTs = getVTList(VT, MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, getRegister(Reg, VT), Flag }; SDValue Ops[] = { Chain, getRegister(Reg, VT), Flag };
return getNode(ISD::CopyFromReg, dl, VTs, Ops, Flag.getNode() ? 3 : 2); return getNode(ISD::CopyFromReg, dl, VTs, Ops, Flag.getNode() ? 3 : 2);
} }
@ -465,7 +465,7 @@ public:
/// a flag result (to ensure it's not CSE'd). CALLSEQ_START does not have a /// a flag result (to ensure it's not CSE'd). CALLSEQ_START does not have a
/// useful DebugLoc. /// useful DebugLoc.
SDValue getCALLSEQ_START(SDValue Chain, SDValue Op) { SDValue getCALLSEQ_START(SDValue Chain, SDValue Op) {
SDVTList VTs = getVTList(MVT::Other, MVT::Flag); SDVTList VTs = getVTList(MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, Op }; SDValue Ops[] = { Chain, Op };
return getNode(ISD::CALLSEQ_START, DebugLoc(), VTs, Ops, 2); return getNode(ISD::CALLSEQ_START, DebugLoc(), VTs, Ops, 2);
} }
@ -475,7 +475,7 @@ public:
/// a useful DebugLoc. /// a useful DebugLoc.
SDValue getCALLSEQ_END(SDValue Chain, SDValue Op1, SDValue Op2, SDValue getCALLSEQ_END(SDValue Chain, SDValue Op1, SDValue Op2,
SDValue InFlag) { SDValue InFlag) {
SDVTList NodeTys = getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = getVTList(MVT::Other, MVT::Glue);
SmallVector<SDValue, 4> Ops; SmallVector<SDValue, 4> Ops;
Ops.push_back(Chain); Ops.push_back(Chain);
Ops.push_back(Op1); Ops.push_back(Op1);

View File

@ -528,7 +528,7 @@ public:
/// to which the flag operand points. Otherwise return NULL. /// to which the flag operand points. Otherwise return NULL.
SDNode *getFlaggedNode() const { SDNode *getFlaggedNode() const {
if (getNumOperands() != 0 && if (getNumOperands() != 0 &&
getOperand(getNumOperands()-1).getValueType() == MVT::Flag) getOperand(getNumOperands()-1).getValueType() == MVT::Glue)
return getOperand(getNumOperands()-1).getNode(); return getOperand(getNumOperands()-1).getNode();
return 0; return 0;
} }
@ -553,7 +553,7 @@ public:
/// the user (there is at most one). Otherwise return NULL. /// the user (there is at most one). Otherwise return NULL.
SDNode *getFlaggedUser() const { SDNode *getFlaggedUser() const {
for (use_iterator UI = use_begin(), UE = use_end(); UI != UE; ++UI) for (use_iterator UI = use_begin(), UE = use_end(); UI != UE; ++UI)
if (UI.getUse().get().getValueType() == MVT::Flag) if (UI.getUse().get().getValueType() == MVT::Glue)
return *UI; return *UI;
return 0; return 0;
} }

View File

@ -79,7 +79,7 @@ namespace llvm {
x86mmx = 33, // This is an X86 MMX value x86mmx = 33, // This is an X86 MMX value
Flag = 34, // This glues nodes together during pre-RA sched Glue = 34, // This glues nodes together during pre-RA sched
isVoid = 35, // This has no value isVoid = 35, // This has no value

View File

@ -1457,7 +1457,7 @@ SDValue DAGCombiner::visitADDC(SDNode *N) {
if (N->hasNUsesOfValue(0, 1)) if (N->hasNUsesOfValue(0, 1))
return CombineTo(N, DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N1, N0), return CombineTo(N, DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N1, N0),
DAG.getNode(ISD::CARRY_FALSE, DAG.getNode(ISD::CARRY_FALSE,
N->getDebugLoc(), MVT::Flag)); N->getDebugLoc(), MVT::Glue));
// canonicalize constant to RHS. // canonicalize constant to RHS.
if (N0C && !N1C) if (N0C && !N1C)
@ -1466,7 +1466,7 @@ SDValue DAGCombiner::visitADDC(SDNode *N) {
// fold (addc x, 0) -> x + no carry out // fold (addc x, 0) -> x + no carry out
if (N1C && N1C->isNullValue()) if (N1C && N1C->isNullValue())
return CombineTo(N, N0, DAG.getNode(ISD::CARRY_FALSE, return CombineTo(N, N0, DAG.getNode(ISD::CARRY_FALSE,
N->getDebugLoc(), MVT::Flag)); N->getDebugLoc(), MVT::Glue));
// fold (addc a, b) -> (or a, b), CARRY_FALSE iff a and b share no bits. // fold (addc a, b) -> (or a, b), CARRY_FALSE iff a and b share no bits.
APInt LHSZero, LHSOne; APInt LHSZero, LHSOne;
@ -1483,7 +1483,7 @@ SDValue DAGCombiner::visitADDC(SDNode *N) {
(LHSZero & (~RHSZero & Mask)) == (~RHSZero & Mask)) (LHSZero & (~RHSZero & Mask)) == (~RHSZero & Mask))
return CombineTo(N, DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N0, N1), return CombineTo(N, DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N0, N1),
DAG.getNode(ISD::CARRY_FALSE, DAG.getNode(ISD::CARRY_FALSE,
N->getDebugLoc(), MVT::Flag)); N->getDebugLoc(), MVT::Glue));
} }
return SDValue(); return SDValue();

View File

@ -35,7 +35,7 @@ using namespace llvm;
/// not go into the resulting MachineInstr). /// not go into the resulting MachineInstr).
unsigned InstrEmitter::CountResults(SDNode *Node) { unsigned InstrEmitter::CountResults(SDNode *Node) {
unsigned N = Node->getNumValues(); unsigned N = Node->getNumValues();
while (N && Node->getValueType(N - 1) == MVT::Flag) while (N && Node->getValueType(N - 1) == MVT::Glue)
--N; --N;
if (N && Node->getValueType(N - 1) == MVT::Other) if (N && Node->getValueType(N - 1) == MVT::Other)
--N; // Skip over chain result. --N; // Skip over chain result.
@ -48,7 +48,7 @@ unsigned InstrEmitter::CountResults(SDNode *Node) {
/// MachineInstr. /// MachineInstr.
unsigned InstrEmitter::CountOperands(SDNode *Node) { unsigned InstrEmitter::CountOperands(SDNode *Node) {
unsigned N = Node->getNumOperands(); unsigned N = Node->getNumOperands();
while (N && Node->getOperand(N - 1).getValueType() == MVT::Flag) while (N && Node->getOperand(N - 1).getValueType() == MVT::Glue)
--N; --N;
if (N && Node->getOperand(N - 1).getValueType() == MVT::Other) if (N && Node->getOperand(N - 1).getValueType() == MVT::Other)
--N; // Ignore chain if it exists. --N; // Ignore chain if it exists.
@ -96,7 +96,7 @@ EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone, bool IsCloned,
if (Op.getNode() != Node || Op.getResNo() != ResNo) if (Op.getNode() != Node || Op.getResNo() != ResNo)
continue; continue;
EVT VT = Node->getValueType(Op.getResNo()); EVT VT = Node->getValueType(Op.getResNo());
if (VT == MVT::Other || VT == MVT::Flag) if (VT == MVT::Other || VT == MVT::Glue)
continue; continue;
Match = false; Match = false;
if (User->isMachineOpcode()) { if (User->isMachineOpcode()) {
@ -264,7 +264,7 @@ InstrEmitter::AddRegisterOperand(MachineInstr *MI, SDValue Op,
DenseMap<SDValue, unsigned> &VRBaseMap, DenseMap<SDValue, unsigned> &VRBaseMap,
bool IsDebug, bool IsClone, bool IsCloned) { bool IsDebug, bool IsClone, bool IsCloned) {
assert(Op.getValueType() != MVT::Other && assert(Op.getValueType() != MVT::Other &&
Op.getValueType() != MVT::Flag && Op.getValueType() != MVT::Glue &&
"Chain and flag operands should occur at end of operand list!"); "Chain and flag operands should occur at end of operand list!");
// Get/emit the operand. // Get/emit the operand.
unsigned VReg = getVR(Op, VRBaseMap); unsigned VReg = getVR(Op, VRBaseMap);
@ -377,7 +377,7 @@ void InstrEmitter::AddOperand(MachineInstr *MI, SDValue Op,
BA->getTargetFlags())); BA->getTargetFlags()));
} else { } else {
assert(Op.getValueType() != MVT::Other && assert(Op.getValueType() != MVT::Other &&
Op.getValueType() != MVT::Flag && Op.getValueType() != MVT::Glue &&
"Chain and flag operands should occur at end of operand list!"); "Chain and flag operands should occur at end of operand list!");
AddRegisterOperand(MI, Op, IIOpNum, II, VRBaseMap, AddRegisterOperand(MI, Op, IIOpNum, II, VRBaseMap,
IsDebug, IsClone, IsCloned); IsDebug, IsClone, IsCloned);
@ -671,7 +671,7 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
// The MachineInstr constructor adds implicit-def operands. Scan through // The MachineInstr constructor adds implicit-def operands. Scan through
// these to determine which are dead. // these to determine which are dead.
if (MI->getNumOperands() != 0 && if (MI->getNumOperands() != 0 &&
Node->getValueType(Node->getNumValues()-1) == MVT::Flag) { Node->getValueType(Node->getNumValues()-1) == MVT::Glue) {
// First, collect all used registers. // First, collect all used registers.
SmallVector<unsigned, 8> UsedRegs; SmallVector<unsigned, 8> UsedRegs;
for (SDNode *F = Node->getFlaggedUser(); F; F = F->getFlaggedUser()) for (SDNode *F = Node->getFlaggedUser(); F; F = F->getFlaggedUser())
@ -729,7 +729,7 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
// MachineLICM/Sink can see that it's dead. Don't do this if the // MachineLICM/Sink can see that it's dead. Don't do this if the
// node has a Flag value, for the benefit of targets still using // node has a Flag value, for the benefit of targets still using
// Flag for values in physregs. // Flag for values in physregs.
else if (Node->getValueType(Node->getNumValues()-1) != MVT::Flag) else if (Node->getValueType(Node->getNumValues()-1) != MVT::Glue)
MI->addRegisterDead(Reg, TRI); MI->addRegisterDead(Reg, TRI);
} }
} }
@ -737,7 +737,7 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
// If the instruction has implicit defs and the node doesn't, mark the // If the instruction has implicit defs and the node doesn't, mark the
// implicit def as dead. If the node has any flag outputs, we don't do this // implicit def as dead. If the node has any flag outputs, we don't do this
// because we don't know what implicit defs are being used by flagged nodes. // because we don't know what implicit defs are being used by flagged nodes.
if (Node->getValueType(Node->getNumValues()-1) != MVT::Flag) if (Node->getValueType(Node->getNumValues()-1) != MVT::Glue)
if (const unsigned *IDList = II.getImplicitDefs()) { if (const unsigned *IDList = II.getImplicitDefs()) {
for (unsigned i = NumResults, e = II.getNumDefs()+II.getNumImplicitDefs(); for (unsigned i = NumResults, e = II.getNumDefs()+II.getNumImplicitDefs();
i != e; ++i) i != e; ++i)
@ -793,7 +793,7 @@ EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned,
case ISD::INLINEASM: { case ISD::INLINEASM: {
unsigned NumOps = Node->getNumOperands(); unsigned NumOps = Node->getNumOperands();
if (Node->getOperand(NumOps-1).getValueType() == MVT::Flag) if (Node->getOperand(NumOps-1).getValueType() == MVT::Glue)
--NumOps; // Ignore the flag operand. --NumOps; // Ignore the flag operand.
// Create the inline asm machine instruction. // Create the inline asm machine instruction.

View File

@ -1085,7 +1085,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
// Do not try to legalize the target-specific arguments (#1+), except for // Do not try to legalize the target-specific arguments (#1+), except for
// an optional flag input. // an optional flag input.
if (Node->getOperand(Node->getNumOperands()-1).getValueType() != MVT::Flag){ if (Node->getOperand(Node->getNumOperands()-1).getValueType() != MVT::Glue){
if (Tmp1 != Node->getOperand(0)) { if (Tmp1 != Node->getOperand(0)) {
SmallVector<SDValue, 8> Ops(Node->op_begin(), Node->op_end()); SmallVector<SDValue, 8> Ops(Node->op_begin(), Node->op_end());
Ops[0] = Tmp1; Ops[0] = Tmp1;

View File

@ -1075,7 +1075,7 @@ void DAGTypeLegalizer::ExpandShiftByConstant(SDNode *N, unsigned Amt,
TLI.isOperationLegalOrCustom(ISD::ADDC, TLI.isOperationLegalOrCustom(ISD::ADDC,
TLI.getTypeToExpandTo(*DAG.getContext(), NVT))) { TLI.getTypeToExpandTo(*DAG.getContext(), NVT))) {
// Emit this X << 1 as X+X. // Emit this X << 1 as X+X.
SDVTList VTList = DAG.getVTList(NVT, MVT::Flag); SDVTList VTList = DAG.getVTList(NVT, MVT::Glue);
SDValue LoOps[2] = { InL, InL }; SDValue LoOps[2] = { InL, InL };
Lo = DAG.getNode(ISD::ADDC, dl, VTList, LoOps, 2); Lo = DAG.getNode(ISD::ADDC, dl, VTList, LoOps, 2);
SDValue HiOps[3] = { InH, InH, Lo.getValue(1) }; SDValue HiOps[3] = { InH, InH, Lo.getValue(1) };
@ -1310,7 +1310,7 @@ void DAGTypeLegalizer::ExpandIntRes_ADDSUB(SDNode *N,
// Do not generate ADDC/ADDE or SUBC/SUBE if the target does not support // Do not generate ADDC/ADDE or SUBC/SUBE if the target does not support
// them. TODO: Teach operation legalization how to expand unsupported // them. TODO: Teach operation legalization how to expand unsupported
// ADDC/ADDE/SUBC/SUBE. The problem is that these operations generate // ADDC/ADDE/SUBC/SUBE. The problem is that these operations generate
// a carry of type MVT::Flag, but there doesn't seem to be any way to // a carry of type MVT::Glue, but there doesn't seem to be any way to
// generate a value of this type in the expanded code sequence. // generate a value of this type in the expanded code sequence.
bool hasCarry = bool hasCarry =
TLI.isOperationLegalOrCustom(N->getOpcode() == ISD::ADD ? TLI.isOperationLegalOrCustom(N->getOpcode() == ISD::ADD ?
@ -1318,7 +1318,7 @@ void DAGTypeLegalizer::ExpandIntRes_ADDSUB(SDNode *N,
TLI.getTypeToExpandTo(*DAG.getContext(), NVT)); TLI.getTypeToExpandTo(*DAG.getContext(), NVT));
if (hasCarry) { if (hasCarry) {
SDVTList VTList = DAG.getVTList(NVT, MVT::Flag); SDVTList VTList = DAG.getVTList(NVT, MVT::Glue);
if (N->getOpcode() == ISD::ADD) { if (N->getOpcode() == ISD::ADD) {
Lo = DAG.getNode(ISD::ADDC, dl, VTList, LoOps, 2); Lo = DAG.getNode(ISD::ADDC, dl, VTList, LoOps, 2);
HiOps[2] = Lo.getValue(1); HiOps[2] = Lo.getValue(1);
@ -1364,7 +1364,7 @@ void DAGTypeLegalizer::ExpandIntRes_ADDSUBC(SDNode *N,
DebugLoc dl = N->getDebugLoc(); DebugLoc dl = N->getDebugLoc();
GetExpandedInteger(N->getOperand(0), LHSL, LHSH); GetExpandedInteger(N->getOperand(0), LHSL, LHSH);
GetExpandedInteger(N->getOperand(1), RHSL, RHSH); GetExpandedInteger(N->getOperand(1), RHSL, RHSH);
SDVTList VTList = DAG.getVTList(LHSL.getValueType(), MVT::Flag); SDVTList VTList = DAG.getVTList(LHSL.getValueType(), MVT::Glue);
SDValue LoOps[2] = { LHSL, RHSL }; SDValue LoOps[2] = { LHSL, RHSL };
SDValue HiOps[3] = { LHSH, RHSH }; SDValue HiOps[3] = { LHSH, RHSH };
@ -1390,7 +1390,7 @@ void DAGTypeLegalizer::ExpandIntRes_ADDSUBE(SDNode *N,
DebugLoc dl = N->getDebugLoc(); DebugLoc dl = N->getDebugLoc();
GetExpandedInteger(N->getOperand(0), LHSL, LHSH); GetExpandedInteger(N->getOperand(0), LHSL, LHSH);
GetExpandedInteger(N->getOperand(1), RHSL, RHSH); GetExpandedInteger(N->getOperand(1), RHSL, RHSH);
SDVTList VTList = DAG.getVTList(LHSL.getValueType(), MVT::Flag); SDVTList VTList = DAG.getVTList(LHSL.getValueType(), MVT::Glue);
SDValue LoOps[3] = { LHSL, RHSL, N->getOperand(2) }; SDValue LoOps[3] = { LHSL, RHSL, N->getOperand(2) };
SDValue HiOps[3] = { LHSH, RHSH }; SDValue HiOps[3] = { LHSH, RHSH };

View File

@ -216,7 +216,7 @@ SUnit *ScheduleDAGFast::CopyAndMoveSuccessors(SUnit *SU) {
bool TryUnfold = false; bool TryUnfold = false;
for (unsigned i = 0, e = N->getNumValues(); i != e; ++i) { for (unsigned i = 0, e = N->getNumValues(); i != e; ++i) {
EVT VT = N->getValueType(i); EVT VT = N->getValueType(i);
if (VT == MVT::Flag) if (VT == MVT::Glue)
return NULL; return NULL;
else if (VT == MVT::Other) else if (VT == MVT::Other)
TryUnfold = true; TryUnfold = true;
@ -224,7 +224,7 @@ SUnit *ScheduleDAGFast::CopyAndMoveSuccessors(SUnit *SU) {
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
const SDValue &Op = N->getOperand(i); const SDValue &Op = N->getOperand(i);
EVT VT = Op.getNode()->getValueType(Op.getResNo()); EVT VT = Op.getNode()->getValueType(Op.getResNo());
if (VT == MVT::Flag) if (VT == MVT::Glue)
return NULL; return NULL;
} }
@ -480,7 +480,7 @@ bool ScheduleDAGFast::DelayForLiveRegsBottomUp(SUnit *SU,
if (Node->getOpcode() == ISD::INLINEASM) { if (Node->getOpcode() == ISD::INLINEASM) {
// Inline asm can clobber physical defs. // Inline asm can clobber physical defs.
unsigned NumOps = Node->getNumOperands(); unsigned NumOps = Node->getNumOperands();
if (Node->getOperand(NumOps-1).getValueType() == MVT::Flag) if (Node->getOperand(NumOps-1).getValueType() == MVT::Glue)
--NumOps; // Ignore the flag operand. --NumOps; // Ignore the flag operand.
for (unsigned i = InlineAsm::Op_FirstOperand; i != NumOps;) { for (unsigned i = InlineAsm::Op_FirstOperand; i != NumOps;) {

View File

@ -401,7 +401,7 @@ SUnit *ScheduleDAGRRList::CopyAndMoveSuccessors(SUnit *SU) {
bool TryUnfold = false; bool TryUnfold = false;
for (unsigned i = 0, e = N->getNumValues(); i != e; ++i) { for (unsigned i = 0, e = N->getNumValues(); i != e; ++i) {
EVT VT = N->getValueType(i); EVT VT = N->getValueType(i);
if (VT == MVT::Flag) if (VT == MVT::Glue)
return NULL; return NULL;
else if (VT == MVT::Other) else if (VT == MVT::Other)
TryUnfold = true; TryUnfold = true;
@ -409,7 +409,7 @@ SUnit *ScheduleDAGRRList::CopyAndMoveSuccessors(SUnit *SU) {
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
const SDValue &Op = N->getOperand(i); const SDValue &Op = N->getOperand(i);
EVT VT = Op.getNode()->getValueType(Op.getResNo()); EVT VT = Op.getNode()->getValueType(Op.getResNo());
if (VT == MVT::Flag) if (VT == MVT::Glue)
return NULL; return NULL;
} }
@ -671,7 +671,7 @@ DelayForLiveRegsBottomUp(SUnit *SU, SmallVector<unsigned, 4> &LRegs) {
if (Node->getOpcode() == ISD::INLINEASM) { if (Node->getOpcode() == ISD::INLINEASM) {
// Inline asm can clobber physical defs. // Inline asm can clobber physical defs.
unsigned NumOps = Node->getNumOperands(); unsigned NumOps = Node->getNumOperands();
if (Node->getOperand(NumOps-1).getValueType() == MVT::Flag) if (Node->getOperand(NumOps-1).getValueType() == MVT::Glue)
--NumOps; // Ignore the flag operand. --NumOps; // Ignore the flag operand.
for (unsigned i = InlineAsm::Op_FirstOperand; i != NumOps;) { for (unsigned i = InlineAsm::Op_FirstOperand; i != NumOps;) {
@ -1410,7 +1410,7 @@ namespace {
unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs(); unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs();
for (unsigned i = NumDefs, e = N->getNumValues(); i != e; ++i) { for (unsigned i = NumDefs, e = N->getNumValues(); i != e; ++i) {
EVT VT = N->getValueType(i); EVT VT = N->getValueType(i);
if (VT == MVT::Flag || VT == MVT::Other) if (VT == MVT::Glue || VT == MVT::Other)
continue; continue;
if (!N->hasAnyUseOfValue(i)) if (!N->hasAnyUseOfValue(i))
continue; continue;
@ -1724,7 +1724,7 @@ static bool canClobberPhysRegDefs(const SUnit *SuccSU, const SUnit *SU,
return false; return false;
for (unsigned i = NumDefs, e = N->getNumValues(); i != e; ++i) { for (unsigned i = NumDefs, e = N->getNumValues(); i != e; ++i) {
EVT VT = N->getValueType(i); EVT VT = N->getValueType(i);
if (VT == MVT::Flag || VT == MVT::Other) if (VT == MVT::Glue || VT == MVT::Other)
continue; continue;
if (!N->hasAnyUseOfValue(i)) if (!N->hasAnyUseOfValue(i))
continue; continue;

View File

@ -118,13 +118,13 @@ static void AddFlags(SDNode *N, SDValue Flag, bool AddFlag,
if (FlagDestNode == N) return; if (FlagDestNode == N) return;
// Don't add a flag to something which already has a flag. // Don't add a flag to something which already has a flag.
if (N->getValueType(N->getNumValues() - 1) == MVT::Flag) return; if (N->getValueType(N->getNumValues() - 1) == MVT::Glue) return;
for (unsigned I = 0, E = N->getNumValues(); I != E; ++I) for (unsigned I = 0, E = N->getNumValues(); I != E; ++I)
VTs.push_back(N->getValueType(I)); VTs.push_back(N->getValueType(I));
if (AddFlag) if (AddFlag)
VTs.push_back(MVT::Flag); VTs.push_back(MVT::Glue);
SmallVector<SDValue, 4> Ops; SmallVector<SDValue, 4> Ops;
for (unsigned I = 0, E = N->getNumOperands(); I != E; ++I) for (unsigned I = 0, E = N->getNumOperands(); I != E; ++I)
@ -152,7 +152,7 @@ static void AddFlags(SDNode *N, SDValue Flag, bool AddFlag,
/// ClusterNeighboringLoads - Force nearby loads together by "flagging" them. /// ClusterNeighboringLoads - Force nearby loads together by "flagging" them.
/// This function finds loads of the same base and different offsets. If the /// This function finds loads of the same base and different offsets. If the
/// offsets are not far apart (target specific), it add MVT::Flag inputs and /// offsets are not far apart (target specific), it add MVT::Glue inputs and
/// outputs to ensure they are scheduled together and in order. This /// outputs to ensure they are scheduled together and in order. This
/// optimization may benefit some targets by improving cache locality. /// optimization may benefit some targets by improving cache locality.
void ScheduleDAGSDNodes::ClusterNeighboringLoads(SDNode *Node) { void ScheduleDAGSDNodes::ClusterNeighboringLoads(SDNode *Node) {
@ -214,7 +214,7 @@ void ScheduleDAGSDNodes::ClusterNeighboringLoads(SDNode *Node) {
if (NumLoads == 0) if (NumLoads == 0)
return; return;
// Cluster loads by adding MVT::Flag outputs and inputs. This also // Cluster loads by adding MVT::Glue outputs and inputs. This also
// ensure they are scheduled in order of increasing addresses. // ensure they are scheduled in order of increasing addresses.
SDNode *Lead = Loads[0]; SDNode *Lead = Loads[0];
AddFlags(Lead, SDValue(0, 0), true, DAG); AddFlags(Lead, SDValue(0, 0), true, DAG);
@ -297,7 +297,7 @@ void ScheduleDAGSDNodes::BuildSchedUnits() {
// Scan up to find flagged preds. // Scan up to find flagged preds.
SDNode *N = NI; SDNode *N = NI;
while (N->getNumOperands() && while (N->getNumOperands() &&
N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Flag) { N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Glue) {
N = N->getOperand(N->getNumOperands()-1).getNode(); N = N->getOperand(N->getNumOperands()-1).getNode();
assert(N->getNodeId() == -1 && "Node already inserted!"); assert(N->getNodeId() == -1 && "Node already inserted!");
N->setNodeId(NodeSUnit->NodeNum); N->setNodeId(NodeSUnit->NodeNum);
@ -307,7 +307,7 @@ void ScheduleDAGSDNodes::BuildSchedUnits() {
// Scan down to find any flagged succs. // Scan down to find any flagged succs.
N = NI; N = NI;
while (N->getValueType(N->getNumValues()-1) == MVT::Flag) { while (N->getValueType(N->getNumValues()-1) == MVT::Glue) {
SDValue FlagVal(N, N->getNumValues()-1); SDValue FlagVal(N, N->getNumValues()-1);
// There are either zero or one users of the Flag result. // There are either zero or one users of the Flag result.
@ -382,7 +382,7 @@ void ScheduleDAGSDNodes::AddSchedEdges() {
if (OpSU == SU) continue; // In the same group. if (OpSU == SU) continue; // In the same group.
EVT OpVT = N->getOperand(i).getValueType(); EVT OpVT = N->getOperand(i).getValueType();
assert(OpVT != MVT::Flag && "Flagged nodes should be in same sunit!"); assert(OpVT != MVT::Glue && "Flagged nodes should be in same sunit!");
bool isChain = OpVT == MVT::Other; bool isChain = OpVT == MVT::Other;
unsigned PhysReg = 0; unsigned PhysReg = 0;

View File

@ -26,7 +26,7 @@ namespace llvm {
/// SDNodes such as Constants, Registers, and a few others that are not /// SDNodes such as Constants, Registers, and a few others that are not
/// interesting to schedulers are not allocated SUnits. /// interesting to schedulers are not allocated SUnits.
/// ///
/// SDNodes with MVT::Flag operands are grouped along with the flagged /// SDNodes with MVT::Glue operands are grouped along with the flagged
/// nodes into a single SUnit so that they are scheduled together. /// nodes into a single SUnit so that they are scheduled together.
/// ///
/// SDNode-based scheduling graphs do not use SDep::Anti or SDep::Output /// SDNode-based scheduling graphs do not use SDep::Anti or SDep::Output

View File

@ -491,7 +491,7 @@ encodeMemSDNodeFlags(int ConvType, ISD::MemIndexedMode AM, bool isVolatile,
/// doNotCSE - Return true if CSE should not be performed for this node. /// doNotCSE - Return true if CSE should not be performed for this node.
static bool doNotCSE(SDNode *N) { static bool doNotCSE(SDNode *N) {
if (N->getValueType(0) == MVT::Flag) if (N->getValueType(0) == MVT::Glue)
return true; // Never CSE anything that produces a flag. return true; // Never CSE anything that produces a flag.
switch (N->getOpcode()) { switch (N->getOpcode()) {
@ -503,7 +503,7 @@ static bool doNotCSE(SDNode *N) {
// Check that remaining values produced are not flags. // Check that remaining values produced are not flags.
for (unsigned i = 1, e = N->getNumValues(); i != e; ++i) for (unsigned i = 1, e = N->getNumValues(); i != e; ++i)
if (N->getValueType(i) == MVT::Flag) if (N->getValueType(i) == MVT::Glue)
return true; // Never CSE anything that produces a flag. return true; // Never CSE anything that produces a flag.
return false; return false;
@ -649,7 +649,7 @@ bool SelectionDAG::RemoveNodeFromCSEMaps(SDNode *N) {
// Verify that the node was actually in one of the CSE maps, unless it has a // Verify that the node was actually in one of the CSE maps, unless it has a
// flag result (which cannot be CSE'd) or is one of the special cases that are // flag result (which cannot be CSE'd) or is one of the special cases that are
// not subject to CSE. // not subject to CSE.
if (!Erased && N->getValueType(N->getNumValues()-1) != MVT::Flag && if (!Erased && N->getValueType(N->getNumValues()-1) != MVT::Glue &&
!N->isMachineOpcode() && !doNotCSE(N)) { !N->isMachineOpcode() && !doNotCSE(N)) {
N->dump(this); N->dump(this);
dbgs() << "\n"; dbgs() << "\n";
@ -2564,7 +2564,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL,
SDNode *N; SDNode *N;
SDVTList VTs = getVTList(VT); SDVTList VTs = getVTList(VT);
if (VT != MVT::Flag) { // Don't CSE flag producing nodes if (VT != MVT::Glue) { // Don't CSE flag producing nodes
FoldingSetNodeID ID; FoldingSetNodeID ID;
SDValue Ops[1] = { Operand }; SDValue Ops[1] = { Operand };
AddNodeIDNode(ID, Opcode, VTs, Ops, 1); AddNodeIDNode(ID, Opcode, VTs, Ops, 1);
@ -3006,7 +3006,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
// Memoize this node if possible. // Memoize this node if possible.
SDNode *N; SDNode *N;
SDVTList VTs = getVTList(VT); SDVTList VTs = getVTList(VT);
if (VT != MVT::Flag) { if (VT != MVT::Glue) {
SDValue Ops[] = { N1, N2 }; SDValue Ops[] = { N1, N2 };
FoldingSetNodeID ID; FoldingSetNodeID ID;
AddNodeIDNode(ID, Opcode, VTs, Ops, 2); AddNodeIDNode(ID, Opcode, VTs, Ops, 2);
@ -3074,7 +3074,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
// Memoize node if it doesn't produce a flag. // Memoize node if it doesn't produce a flag.
SDNode *N; SDNode *N;
SDVTList VTs = getVTList(VT); SDVTList VTs = getVTList(VT);
if (VT != MVT::Flag) { if (VT != MVT::Glue) {
SDValue Ops[] = { N1, N2, N3 }; SDValue Ops[] = { N1, N2, N3 };
FoldingSetNodeID ID; FoldingSetNodeID ID;
AddNodeIDNode(ID, Opcode, VTs, Ops, 3); AddNodeIDNode(ID, Opcode, VTs, Ops, 3);
@ -3882,7 +3882,7 @@ SelectionDAG::getMemIntrinsicNode(unsigned Opcode, DebugLoc dl, SDVTList VTList,
// Memoize the node unless it returns a flag. // Memoize the node unless it returns a flag.
MemIntrinsicSDNode *N; MemIntrinsicSDNode *N;
if (VTList.VTs[VTList.NumVTs-1] != MVT::Flag) { if (VTList.VTs[VTList.NumVTs-1] != MVT::Glue) {
FoldingSetNodeID ID; FoldingSetNodeID ID;
AddNodeIDNode(ID, Opcode, VTList, Ops, NumOps); AddNodeIDNode(ID, Opcode, VTList, Ops, NumOps);
void *IP = 0; void *IP = 0;
@ -4238,7 +4238,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
SDNode *N; SDNode *N;
SDVTList VTs = getVTList(VT); SDVTList VTs = getVTList(VT);
if (VT != MVT::Flag) { if (VT != MVT::Glue) {
FoldingSetNodeID ID; FoldingSetNodeID ID;
AddNodeIDNode(ID, Opcode, VTs, Ops, NumOps); AddNodeIDNode(ID, Opcode, VTs, Ops, NumOps);
void *IP = 0; void *IP = 0;
@ -4304,7 +4304,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, SDVTList VTList,
// Memoize the node unless it returns a flag. // Memoize the node unless it returns a flag.
SDNode *N; SDNode *N;
if (VTList.VTs[VTList.NumVTs-1] != MVT::Flag) { if (VTList.VTs[VTList.NumVTs-1] != MVT::Glue) {
FoldingSetNodeID ID; FoldingSetNodeID ID;
AddNodeIDNode(ID, Opcode, VTList, Ops, NumOps); AddNodeIDNode(ID, Opcode, VTList, Ops, NumOps);
void *IP = 0; void *IP = 0;
@ -4713,7 +4713,7 @@ SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc,
unsigned NumOps) { unsigned NumOps) {
// If an identical node already exists, use it. // If an identical node already exists, use it.
void *IP = 0; void *IP = 0;
if (VTs.VTs[VTs.NumVTs-1] != MVT::Flag) { if (VTs.VTs[VTs.NumVTs-1] != MVT::Glue) {
FoldingSetNodeID ID; FoldingSetNodeID ID;
AddNodeIDNode(ID, Opc, VTs, Ops, NumOps); AddNodeIDNode(ID, Opc, VTs, Ops, NumOps);
if (SDNode *ON = CSEMap.FindNodeOrInsertPos(ID, IP)) if (SDNode *ON = CSEMap.FindNodeOrInsertPos(ID, IP))
@ -4913,7 +4913,7 @@ SelectionDAG::getMachineNode(unsigned Opcode, DebugLoc dl,
MachineSDNode * MachineSDNode *
SelectionDAG::getMachineNode(unsigned Opcode, DebugLoc DL, SDVTList VTs, SelectionDAG::getMachineNode(unsigned Opcode, DebugLoc DL, SDVTList VTs,
const SDValue *Ops, unsigned NumOps) { const SDValue *Ops, unsigned NumOps) {
bool DoCSE = VTs.VTs[VTs.NumVTs-1] != MVT::Flag; bool DoCSE = VTs.VTs[VTs.NumVTs-1] != MVT::Glue;
MachineSDNode *N; MachineSDNode *N;
void *IP; void *IP;
@ -4975,7 +4975,7 @@ SelectionDAG::getTargetInsertSubreg(int SRIdx, DebugLoc DL, EVT VT,
/// else return NULL. /// else return NULL.
SDNode *SelectionDAG::getNodeIfExists(unsigned Opcode, SDVTList VTList, SDNode *SelectionDAG::getNodeIfExists(unsigned Opcode, SDVTList VTList,
const SDValue *Ops, unsigned NumOps) { const SDValue *Ops, unsigned NumOps) {
if (VTList.VTs[VTList.NumVTs-1] != MVT::Flag) { if (VTList.VTs[VTList.NumVTs-1] != MVT::Glue) {
FoldingSetNodeID ID; FoldingSetNodeID ID;
AddNodeIDNode(ID, Opcode, VTList, Ops, NumOps); AddNodeIDNode(ID, Opcode, VTList, Ops, NumOps);
void *IP = 0; void *IP = 0;

View File

@ -5922,7 +5922,7 @@ void SelectionDAGBuilder::visitInlineAsm(ImmutableCallSite CS) {
if (Flag.getNode()) AsmNodeOperands.push_back(Flag); if (Flag.getNode()) AsmNodeOperands.push_back(Flag);
Chain = DAG.getNode(ISD::INLINEASM, getCurDebugLoc(), Chain = DAG.getNode(ISD::INLINEASM, getCurDebugLoc(),
DAG.getVTList(MVT::Other, MVT::Flag), DAG.getVTList(MVT::Other, MVT::Glue),
&AsmNodeOperands[0], AsmNodeOperands.size()); &AsmNodeOperands[0], AsmNodeOperands.size());
Flag = Chain.getValue(1); Flag = Chain.getValue(1);

View File

@ -1287,7 +1287,7 @@ SelectInlineAsmMemoryOperands(std::vector<SDValue> &Ops) {
Ops.push_back(InOps[InlineAsm::Op_IsAlignStack]); // 3 Ops.push_back(InOps[InlineAsm::Op_IsAlignStack]); // 3
unsigned i = InlineAsm::Op_FirstOperand, e = InOps.size(); unsigned i = InlineAsm::Op_FirstOperand, e = InOps.size();
if (InOps[e-1].getValueType() == MVT::Flag) if (InOps[e-1].getValueType() == MVT::Glue)
--e; // Don't process a flag operand if it is here. --e; // Don't process a flag operand if it is here.
while (i != e) { while (i != e) {
@ -1435,7 +1435,7 @@ bool SelectionDAGISel::IsLegalToFold(SDValue N, SDNode *U, SDNode *Root,
// If the node has flags, walk down the graph to the "lowest" node in the // If the node has flags, walk down the graph to the "lowest" node in the
// flagged set. // flagged set.
EVT VT = Root->getValueType(Root->getNumValues()-1); EVT VT = Root->getValueType(Root->getNumValues()-1);
while (VT == MVT::Flag) { while (VT == MVT::Glue) {
SDNode *FU = findFlagUse(Root); SDNode *FU = findFlagUse(Root);
if (FU == NULL) if (FU == NULL)
break; break;
@ -1460,7 +1460,7 @@ SDNode *SelectionDAGISel::Select_INLINEASM(SDNode *N) {
std::vector<EVT> VTs; std::vector<EVT> VTs;
VTs.push_back(MVT::Other); VTs.push_back(MVT::Other);
VTs.push_back(MVT::Flag); 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);
@ -1521,7 +1521,7 @@ UpdateChainsAndFlags(SDNode *NodeToMatch, SDValue InputChain,
continue; continue;
SDValue ChainVal = SDValue(ChainNode, ChainNode->getNumValues()-1); SDValue ChainVal = SDValue(ChainNode, ChainNode->getNumValues()-1);
if (ChainVal.getValueType() == MVT::Flag) if (ChainVal.getValueType() == MVT::Glue)
ChainVal = ChainVal.getValue(ChainVal->getNumValues()-2); ChainVal = ChainVal.getValue(ChainVal->getNumValues()-2);
assert(ChainVal.getValueType() == MVT::Other && "Not a chain?"); assert(ChainVal.getValueType() == MVT::Other && "Not a chain?");
CurDAG->ReplaceAllUsesOfValueWith(ChainVal, InputChain, &ISU); CurDAG->ReplaceAllUsesOfValueWith(ChainVal, InputChain, &ISU);
@ -1544,7 +1544,7 @@ UpdateChainsAndFlags(SDNode *NodeToMatch, SDValue InputChain,
if (FRN->getOpcode() == ISD::DELETED_NODE) if (FRN->getOpcode() == ISD::DELETED_NODE)
continue; continue;
assert(FRN->getValueType(FRN->getNumValues()-1) == MVT::Flag && assert(FRN->getValueType(FRN->getNumValues()-1) == MVT::Glue &&
"Doesn't have a flag result"); "Doesn't have a flag result");
CurDAG->ReplaceAllUsesOfValueWith(SDValue(FRN, FRN->getNumValues()-1), CurDAG->ReplaceAllUsesOfValueWith(SDValue(FRN, FRN->getNumValues()-1),
InputFlag, &ISU); InputFlag, &ISU);
@ -1752,7 +1752,7 @@ MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTList,
int OldFlagResultNo = -1, OldChainResultNo = -1; int OldFlagResultNo = -1, OldChainResultNo = -1;
unsigned NTMNumResults = Node->getNumValues(); unsigned NTMNumResults = Node->getNumValues();
if (Node->getValueType(NTMNumResults-1) == MVT::Flag) { if (Node->getValueType(NTMNumResults-1) == MVT::Glue) {
OldFlagResultNo = NTMNumResults-1; OldFlagResultNo = NTMNumResults-1;
if (NTMNumResults != 1 && if (NTMNumResults != 1 &&
Node->getValueType(NTMNumResults-2) == MVT::Other) Node->getValueType(NTMNumResults-2) == MVT::Other)
@ -2193,7 +2193,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
case OPC_CaptureFlagInput: case OPC_CaptureFlagInput:
// If the current node has an input flag, capture it in InputFlag. // If the current node has an input flag, capture it in InputFlag.
if (N->getNumOperands() != 0 && if (N->getNumOperands() != 0 &&
N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Flag) N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Glue)
InputFlag = N->getOperand(N->getNumOperands()-1); InputFlag = N->getOperand(N->getNumOperands()-1);
continue; continue;
@ -2503,7 +2503,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
if (EmitNodeInfo & OPFL_Chain) if (EmitNodeInfo & OPFL_Chain)
VTs.push_back(MVT::Other); VTs.push_back(MVT::Other);
if (EmitNodeInfo & OPFL_FlagOutput) if (EmitNodeInfo & OPFL_FlagOutput)
VTs.push_back(MVT::Flag); VTs.push_back(MVT::Glue);
// This is hot code, so optimize the two most common cases of 1 and 2 // This is hot code, so optimize the two most common cases of 1 and 2
// results. // results.
@ -2539,7 +2539,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
for (unsigned i = FirstOpToCopy, e = NodeToMatch->getNumOperands(); for (unsigned i = FirstOpToCopy, e = NodeToMatch->getNumOperands();
i != e; ++i) { i != e; ++i) {
SDValue V = NodeToMatch->getOperand(i); SDValue V = NodeToMatch->getOperand(i);
if (V.getValueType() == MVT::Flag) break; if (V.getValueType() == MVT::Glue) break;
Ops.push_back(V); Ops.push_back(V);
} }
} }
@ -2560,7 +2560,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
// Add all the non-flag/non-chain results to the RecordedNodes list. // Add all the non-flag/non-chain results to the RecordedNodes list.
for (unsigned i = 0, e = VTs.size(); i != e; ++i) { for (unsigned i = 0, e = VTs.size(); i != e; ++i) {
if (VTs[i] == MVT::Other || VTs[i] == MVT::Flag) break; if (VTs[i] == MVT::Other || VTs[i] == MVT::Glue) break;
RecordedNodes.push_back(std::pair<SDValue,SDNode*>(SDValue(Res, i), RecordedNodes.push_back(std::pair<SDValue,SDNode*>(SDValue(Res, i),
(SDNode*) 0)); (SDNode*) 0));
} }
@ -2639,7 +2639,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
assert(i < NodeToMatch->getNumValues() && assert(i < NodeToMatch->getNumValues() &&
NodeToMatch->getValueType(i) != MVT::Other && NodeToMatch->getValueType(i) != MVT::Other &&
NodeToMatch->getValueType(i) != MVT::Flag && NodeToMatch->getValueType(i) != MVT::Glue &&
"Invalid number of results to complete!"); "Invalid number of results to complete!");
assert((NodeToMatch->getValueType(i) == Res.getValueType() || assert((NodeToMatch->getValueType(i) == Res.getValueType() ||
NodeToMatch->getValueType(i) == MVT::iPTR || NodeToMatch->getValueType(i) == MVT::iPTR ||
@ -2652,7 +2652,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
// If the root node defines a flag, add it to the flag nodes to update // If the root node defines a flag, add it to the flag nodes to update
// list. // list.
if (NodeToMatch->getValueType(NodeToMatch->getNumValues()-1) == MVT::Flag) if (NodeToMatch->getValueType(NodeToMatch->getNumValues()-1) == MVT::Glue)
FlagResultNodesMatched.push_back(NodeToMatch); FlagResultNodesMatched.push_back(NodeToMatch);
// Update chain and flag uses. // Update chain and flag uses.

View File

@ -93,7 +93,7 @@ namespace llvm {
static std::string getEdgeAttributes(const void *Node, EdgeIter EI) { static std::string getEdgeAttributes(const void *Node, EdgeIter EI) {
SDValue Op = EI.getNode()->getOperand(EI.getOperand()); SDValue Op = EI.getNode()->getOperand(EI.getOperand());
EVT VT = Op.getValueType(); EVT VT = Op.getValueType();
if (VT == MVT::Flag) if (VT == MVT::Glue)
return "color=red,style=bold"; return "color=red,style=bold";
else if (VT == MVT::Other) else if (VT == MVT::Other)
return "color=blue,style=dashed"; return "color=blue,style=dashed";

View File

@ -2379,7 +2379,7 @@ SDNode *ARMDAGToDAGISel::Select(SDNode *N) {
MVT::i32); MVT::i32);
SDValue Ops[] = { N1, Tmp2, N3, Chain, InFlag }; SDValue Ops[] = { N1, Tmp2, N3, Chain, InFlag };
SDNode *ResNode = CurDAG->getMachineNode(Opc, dl, MVT::Other, SDNode *ResNode = CurDAG->getMachineNode(Opc, dl, MVT::Other,
MVT::Flag, Ops, 5); MVT::Glue, Ops, 5);
Chain = SDValue(ResNode, 0); Chain = SDValue(ResNode, 0);
if (N->getNumValues() == 2) { if (N->getNumValues() == 2) {
InFlag = SDValue(ResNode, 1); InFlag = SDValue(ResNode, 1);

View File

@ -874,7 +874,7 @@ Sched::Preference ARMTargetLowering::getSchedulingPreference(SDNode *N) const {
for (unsigned i = 0; i != NumVals; ++i) { for (unsigned i = 0; i != NumVals; ++i) {
EVT VT = N->getValueType(i); EVT VT = N->getValueType(i);
if (VT == MVT::Flag || VT == MVT::Other) if (VT == MVT::Glue || VT == MVT::Other)
continue; continue;
if (VT.isFloatingPoint() || VT.isVector()) if (VT.isFloatingPoint() || VT.isVector())
return Sched::Latency; return Sched::Latency;
@ -1423,7 +1423,7 @@ ARMTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
if (InFlag.getNode()) if (InFlag.getNode())
Ops.push_back(InFlag); Ops.push_back(InFlag);
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
if (isTailCall) if (isTailCall)
return DAG.getNode(ARMISD::TC_RETURN, dl, NodeTys, &Ops[0], Ops.size()); return DAG.getNode(ARMISD::TC_RETURN, dl, NodeTys, &Ops[0], Ops.size());
@ -2430,7 +2430,7 @@ ARMTargetLowering::getARMCmp(SDValue LHS, SDValue RHS, ISD::CondCode CC,
break; break;
} }
ARMcc = DAG.getConstant(CondCode, MVT::i32); ARMcc = DAG.getConstant(CondCode, MVT::i32);
return DAG.getNode(CompareType, dl, MVT::Flag, LHS, RHS); return DAG.getNode(CompareType, dl, MVT::Glue, LHS, RHS);
} }
/// Returns a appropriate VFP CMP (fcmp{s|d}+fmstat) for the given operands. /// Returns a appropriate VFP CMP (fcmp{s|d}+fmstat) for the given operands.
@ -2439,10 +2439,10 @@ ARMTargetLowering::getVFPCmp(SDValue LHS, SDValue RHS, SelectionDAG &DAG,
DebugLoc dl) const { DebugLoc dl) const {
SDValue Cmp; SDValue Cmp;
if (!isFloatingPointZero(RHS)) if (!isFloatingPointZero(RHS))
Cmp = DAG.getNode(ARMISD::CMPFP, dl, MVT::Flag, LHS, RHS); Cmp = DAG.getNode(ARMISD::CMPFP, dl, MVT::Glue, LHS, RHS);
else else
Cmp = DAG.getNode(ARMISD::CMPFPw0, dl, MVT::Flag, LHS); Cmp = DAG.getNode(ARMISD::CMPFPw0, dl, MVT::Glue, LHS);
return DAG.getNode(ARMISD::FMSTAT, dl, MVT::Flag, Cmp); return DAG.getNode(ARMISD::FMSTAT, dl, MVT::Glue, Cmp);
} }
SDValue ARMTargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const { SDValue ARMTargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
@ -2633,7 +2633,7 @@ ARMTargetLowering::OptimizeVFPBrcond(SDValue Op, SelectionDAG &DAG) const {
expandf64Toi32(RHS, DAG, RHS1, RHS2); expandf64Toi32(RHS, DAG, RHS1, RHS2);
ARMCC::CondCodes CondCode = IntCCToARMCC(CC); ARMCC::CondCodes CondCode = IntCCToARMCC(CC);
ARMcc = DAG.getConstant(CondCode, MVT::i32); ARMcc = DAG.getConstant(CondCode, MVT::i32);
SDVTList VTList = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList VTList = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, ARMcc, LHS1, LHS2, RHS1, RHS2, Dest }; SDValue Ops[] = { Chain, ARMcc, LHS1, LHS2, RHS1, RHS2, Dest };
return DAG.getNode(ARMISD::BCC_i64, dl, VTList, Ops, 7); return DAG.getNode(ARMISD::BCC_i64, dl, VTList, Ops, 7);
} }
@ -2673,7 +2673,7 @@ SDValue ARMTargetLowering::LowerBR_CC(SDValue Op, SelectionDAG &DAG) const {
SDValue ARMcc = DAG.getConstant(CondCode, MVT::i32); SDValue ARMcc = DAG.getConstant(CondCode, MVT::i32);
SDValue Cmp = getVFPCmp(LHS, RHS, DAG, dl); SDValue Cmp = getVFPCmp(LHS, RHS, DAG, dl);
SDValue CCR = DAG.getRegister(ARM::CPSR, MVT::i32); SDValue CCR = DAG.getRegister(ARM::CPSR, MVT::i32);
SDVTList VTList = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList VTList = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, Dest, ARMcc, CCR, Cmp }; SDValue Ops[] = { Chain, Dest, ARMcc, CCR, Cmp };
SDValue Res = DAG.getNode(ARMISD::BRCOND, dl, VTList, Ops, 5); SDValue Res = DAG.getNode(ARMISD::BRCOND, dl, VTList, Ops, 5);
if (CondCode2 != ARMCC::AL) { if (CondCode2 != ARMCC::AL) {
@ -3029,7 +3029,7 @@ static SDValue Expand64BitShift(SDNode *N, SelectionDAG &DAG,
// First, build a SRA_FLAG/SRL_FLAG op, which shifts the top part by one and // First, build a SRA_FLAG/SRL_FLAG op, which shifts the top part by one and
// captures the result into a carry flag. // captures the result into a carry flag.
unsigned Opc = N->getOpcode() == ISD::SRL ? ARMISD::SRL_FLAG:ARMISD::SRA_FLAG; unsigned Opc = N->getOpcode() == ISD::SRL ? ARMISD::SRL_FLAG:ARMISD::SRA_FLAG;
Hi = DAG.getNode(Opc, dl, DAG.getVTList(MVT::i32, MVT::Flag), &Hi, 1); Hi = DAG.getNode(Opc, dl, DAG.getVTList(MVT::i32, MVT::Glue), &Hi, 1);
// The low part is an ARMISD::RRX operand, which shifts the carry in. // The low part is an ARMISD::RRX operand, which shifts the carry in.
Lo = DAG.getNode(ARMISD::RRX, dl, MVT::i32, Lo, Hi.getValue(1)); Lo = DAG.getNode(ARMISD::RRX, dl, MVT::i32, Lo, Hi.getValue(1));

View File

@ -240,7 +240,7 @@ SDNode *AlphaDAGToDAGISel::Select(SDNode *N) {
Chain = CurDAG->getCopyToReg(Chain, dl, Alpha::R27, N0, Chain = CurDAG->getCopyToReg(Chain, dl, Alpha::R27, N0,
Chain.getValue(1)); Chain.getValue(1));
SDNode *CNode = SDNode *CNode =
CurDAG->getMachineNode(Alpha::JSRs, dl, MVT::Other, MVT::Flag, CurDAG->getMachineNode(Alpha::JSRs, dl, MVT::Other, MVT::Glue,
Chain, Chain.getValue(1)); Chain, Chain.getValue(1));
Chain = CurDAG->getCopyFromReg(Chain, dl, Alpha::R27, MVT::i64, Chain = CurDAG->getCopyFromReg(Chain, dl, Alpha::R27, MVT::i64,
SDValue(CNode, 1)); SDValue(CNode, 1));
@ -403,13 +403,13 @@ void AlphaDAGToDAGISel::SelectCALL(SDNode *N) {
Chain = CurDAG->getCopyToReg(Chain, dl, Alpha::R29, GOT, InFlag); Chain = CurDAG->getCopyToReg(Chain, dl, Alpha::R29, GOT, InFlag);
InFlag = Chain.getValue(1); InFlag = Chain.getValue(1);
Chain = SDValue(CurDAG->getMachineNode(Alpha::BSR, dl, MVT::Other, Chain = SDValue(CurDAG->getMachineNode(Alpha::BSR, dl, MVT::Other,
MVT::Flag, Addr.getOperand(0), MVT::Glue, Addr.getOperand(0),
Chain, InFlag), 0); Chain, InFlag), 0);
} else { } else {
Chain = CurDAG->getCopyToReg(Chain, dl, Alpha::R27, Addr, InFlag); Chain = CurDAG->getCopyToReg(Chain, dl, Alpha::R27, Addr, InFlag);
InFlag = Chain.getValue(1); InFlag = Chain.getValue(1);
Chain = SDValue(CurDAG->getMachineNode(Alpha::JSR, dl, MVT::Other, Chain = SDValue(CurDAG->getMachineNode(Alpha::JSR, dl, MVT::Other,
MVT::Flag, Chain, InFlag), 0); MVT::Glue, Chain, InFlag), 0);
} }
InFlag = Chain.getValue(1); InFlag = Chain.getValue(1);

View File

@ -306,7 +306,7 @@ AlphaTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
} }
// Returns a chain & a flag for retval copy to use. // Returns a chain & a flag for retval copy to use.
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
SmallVector<SDValue, 8> Ops; SmallVector<SDValue, 8> Ops;
Ops.push_back(Chain); Ops.push_back(Chain);
Ops.push_back(Callee); Ops.push_back(Callee);

View File

@ -365,7 +365,7 @@ BlackfinTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
std::vector<EVT> NodeTys; std::vector<EVT> NodeTys;
NodeTys.push_back(MVT::Other); // Returns a chain NodeTys.push_back(MVT::Other); // Returns a chain
NodeTys.push_back(MVT::Flag); // Returns a flag for retval copy to use. NodeTys.push_back(MVT::Glue); // Returns a flag for retval copy to use.
SDValue Ops[] = { Chain, Callee, InFlag }; SDValue Ops[] = { Chain, Callee, InFlag };
Chain = DAG.getNode(BFISD::CALL, dl, NodeTys, Ops, Chain = DAG.getNode(BFISD::CALL, dl, NodeTys, Ops,
InFlag.getNode() ? 3 : 2); InFlag.getNode() ? 3 : 2);
@ -432,7 +432,7 @@ SDValue BlackfinTargetLowering::LowerADDE(SDValue Op, SelectionDAG &DAG) const {
SDValue(CarryIn, 0)); SDValue(CarryIn, 0));
// Add operands, produce sum and carry flag // Add operands, produce sum and carry flag
SDNode *Sum = DAG.getMachineNode(Opcode, dl, MVT::i32, MVT::Flag, SDNode *Sum = DAG.getMachineNode(Opcode, dl, MVT::i32, MVT::Glue,
Op.getOperand(0), Op.getOperand(1)); Op.getOperand(0), Op.getOperand(1));
// Store intermediate carry from Sum // Store intermediate carry from Sum
@ -440,11 +440,11 @@ SDValue BlackfinTargetLowering::LowerADDE(SDValue Op, SelectionDAG &DAG) const {
/* flag= */ SDValue(Sum, 1)); /* flag= */ SDValue(Sum, 1));
// Add incoming carry, again producing an output flag // Add incoming carry, again producing an output flag
Sum = DAG.getMachineNode(Opcode, dl, MVT::i32, MVT::Flag, Sum = DAG.getMachineNode(Opcode, dl, MVT::i32, MVT::Glue,
SDValue(Sum, 0), SDValue(CarryIn, 0)); SDValue(Sum, 0), SDValue(CarryIn, 0));
// Update AC0 with the intermediate carry, producing a flag. // Update AC0 with the intermediate carry, producing a flag.
SDNode *CarryOut = DAG.getMachineNode(BF::OR_ac0_cc, dl, MVT::Flag, SDNode *CarryOut = DAG.getMachineNode(BF::OR_ac0_cc, dl, MVT::Glue,
SDValue(Carry1, 0)); SDValue(Carry1, 0));
// Compose (i32, flag) pair // Compose (i32, flag) pair

View File

@ -1423,7 +1423,7 @@ SPUTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
if (InFlag.getNode()) if (InFlag.getNode())
Ops.push_back(InFlag); Ops.push_back(InFlag);
// Returns a chain and a flag for retval copy to use. // Returns a chain and a flag for retval copy to use.
Chain = DAG.getNode(CallOpc, dl, DAG.getVTList(MVT::Other, MVT::Flag), Chain = DAG.getNode(CallOpc, dl, DAG.getVTList(MVT::Other, MVT::Glue),
&Ops[0], Ops.size()); &Ops[0], Ops.size());
InFlag = Chain.getValue(1); InFlag = Chain.getValue(1);

View File

@ -248,7 +248,7 @@ SDNode* MBlazeDAGToDAGISel::Select(SDNode *Node) {
// Emit Jump and Link Register // Emit Jump and Link Register
SDNode *ResNode = CurDAG->getMachineNode(MBlaze::BRLID, dl, MVT::Other, SDNode *ResNode = CurDAG->getMachineNode(MBlaze::BRLID, dl, MVT::Other,
MVT::Flag, R20Reg, Chain); MVT::Glue, R20Reg, Chain);
Chain = SDValue(ResNode, 0); Chain = SDValue(ResNode, 0);
InFlag = SDValue(ResNode, 1); InFlag = SDValue(ResNode, 1);
ReplaceUses(SDValue(Node, 0), Chain); ReplaceUses(SDValue(Node, 0), Chain);

View File

@ -621,7 +621,7 @@ LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv,
// = Chain, Callee, Reg#1, Reg#2, ... // = Chain, Callee, Reg#1, Reg#2, ...
// //
// Returns a chain & a flag for retval copy to use. // Returns a chain & a flag for retval copy to use.
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
SmallVector<SDValue, 8> Ops; SmallVector<SDValue, 8> Ops;
Ops.push_back(Chain); Ops.push_back(Chain);
Ops.push_back(Callee); Ops.push_back(Callee);

View File

@ -536,7 +536,7 @@ MSP430TargetLowering::LowerCCCCallTo(SDValue Chain, SDValue Callee,
Callee = DAG.getTargetExternalSymbol(E->getSymbol(), MVT::i16); Callee = DAG.getTargetExternalSymbol(E->getSymbol(), MVT::i16);
// Returns a chain & a flag for retval copy to use. // Returns a chain & a flag for retval copy to use.
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
SmallVector<SDValue, 8> Ops; SmallVector<SDValue, 8> Ops;
Ops.push_back(Chain); Ops.push_back(Chain);
Ops.push_back(Callee); Ops.push_back(Callee);
@ -747,7 +747,7 @@ static SDValue EmitCMP(SDValue &LHS, SDValue &RHS, SDValue &TargetCC,
} }
TargetCC = DAG.getConstant(TCC, MVT::i8); TargetCC = DAG.getConstant(TCC, MVT::i8);
return DAG.getNode(MSP430ISD::CMP, dl, MVT::Flag, LHS, RHS); return DAG.getNode(MSP430ISD::CMP, dl, MVT::Glue, LHS, RHS);
} }
@ -836,7 +836,7 @@ SDValue MSP430TargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
return SR; return SR;
} else { } else {
SDValue Zero = DAG.getConstant(0, VT); SDValue Zero = DAG.getConstant(0, VT);
SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Flag); SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Glue);
SmallVector<SDValue, 4> Ops; SmallVector<SDValue, 4> Ops;
Ops.push_back(One); Ops.push_back(One);
Ops.push_back(Zero); Ops.push_back(Zero);
@ -858,7 +858,7 @@ SDValue MSP430TargetLowering::LowerSELECT_CC(SDValue Op,
SDValue TargetCC; SDValue TargetCC;
SDValue Flag = EmitCMP(LHS, RHS, TargetCC, CC, dl, DAG); SDValue Flag = EmitCMP(LHS, RHS, TargetCC, CC, dl, DAG);
SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Flag); SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Glue);
SmallVector<SDValue, 4> Ops; SmallVector<SDValue, 4> Ops;
Ops.push_back(TrueV); Ops.push_back(TrueV);
Ops.push_back(FalseV); Ops.push_back(FalseV);

View File

@ -349,7 +349,7 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {
SDNode *AddCarry = CurDAG->getMachineNode(Mips::ADDu, dl, VT, SDNode *AddCarry = CurDAG->getMachineNode(Mips::ADDu, dl, VT,
SDValue(Carry,0), RHS); SDValue(Carry,0), RHS);
return CurDAG->SelectNodeTo(Node, MOp, VT, MVT::Flag, return CurDAG->SelectNodeTo(Node, MOp, VT, MVT::Glue,
LHS, SDValue(AddCarry,0)); LHS, SDValue(AddCarry,0));
} }
@ -367,11 +367,11 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {
else else
Op = (Opcode == ISD::UDIVREM ? Mips::DIVu : Mips::DIV); Op = (Opcode == ISD::UDIVREM ? Mips::DIVu : Mips::DIV);
SDNode *MulDiv = CurDAG->getMachineNode(Op, dl, MVT::Flag, Op1, Op2); SDNode *MulDiv = CurDAG->getMachineNode(Op, dl, MVT::Glue, Op1, Op2);
SDValue InFlag = SDValue(MulDiv, 0); SDValue InFlag = SDValue(MulDiv, 0);
SDNode *Lo = CurDAG->getMachineNode(Mips::MFLO, dl, MVT::i32, SDNode *Lo = CurDAG->getMachineNode(Mips::MFLO, dl, MVT::i32,
MVT::Flag, InFlag); MVT::Glue, InFlag);
InFlag = SDValue(Lo,1); InFlag = SDValue(Lo,1);
SDNode *Hi = CurDAG->getMachineNode(Mips::MFHI, dl, MVT::i32, InFlag); SDNode *Hi = CurDAG->getMachineNode(Mips::MFHI, dl, MVT::i32, InFlag);
@ -395,7 +395,7 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {
unsigned MulOp = (Opcode == ISD::MULHU ? Mips::MULTu : Mips::MULT); unsigned MulOp = (Opcode == ISD::MULHU ? Mips::MULTu : Mips::MULT);
SDNode *MulNode = CurDAG->getMachineNode(MulOp, dl, SDNode *MulNode = CurDAG->getMachineNode(MulOp, dl,
MVT::Flag, MulOp1, MulOp2); MVT::Glue, MulOp1, MulOp2);
SDValue InFlag = SDValue(MulNode, 0); SDValue InFlag = SDValue(MulNode, 0);
@ -421,7 +421,7 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {
Op = (Opcode == ISD::SREM ? Mips::DIV : Mips::DIVu); Op = (Opcode == ISD::SREM ? Mips::DIV : Mips::DIVu);
MOp = Mips::MFHI; MOp = Mips::MFHI;
} }
SDNode *Node = CurDAG->getMachineNode(Op, dl, MVT::Flag, Op1, Op2); SDNode *Node = CurDAG->getMachineNode(Op, dl, MVT::Glue, Op1, Op2);
SDValue InFlag = SDValue(Node, 0); SDValue InFlag = SDValue(Node, 0);
return CurDAG->getMachineNode(MOp, dl, MVT::i32, InFlag); return CurDAG->getMachineNode(MOp, dl, MVT::i32, InFlag);
@ -474,7 +474,7 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {
SDValue InFlag; SDValue InFlag;
// Skip the incomming flag if present // Skip the incomming flag if present
if (Node->getOperand(LastOpNum).getValueType() == MVT::Flag) if (Node->getOperand(LastOpNum).getValueType() == MVT::Glue)
LastOpNum--; LastOpNum--;
if ( (isa<GlobalAddressSDNode>(Callee)) || if ( (isa<GlobalAddressSDNode>(Callee)) ||
@ -496,7 +496,7 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {
Chain = CurDAG->getCopyToReg(Chain, dl, Mips::T9, Callee, InFlag); Chain = CurDAG->getCopyToReg(Chain, dl, Mips::T9, Callee, InFlag);
// Map the JmpLink operands to JALR // Map the JmpLink operands to JALR
SDVTList NodeTys = CurDAG->getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = CurDAG->getVTList(MVT::Other, MVT::Glue);
SmallVector<SDValue, 8> Ops; SmallVector<SDValue, 8> Ops;
Ops.push_back(CurDAG->getRegister(Mips::T9, MVT::i32)); Ops.push_back(CurDAG->getRegister(Mips::T9, MVT::i32));

View File

@ -905,7 +905,7 @@ MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
// = Chain, Callee, Reg#1, Reg#2, ... // = Chain, Callee, Reg#1, Reg#2, ...
// //
// Returns a chain & a flag for retval copy to use. // Returns a chain & a flag for retval copy to use.
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
SmallVector<SDValue, 8> Ops; SmallVector<SDValue, 8> Ops;
Ops.push_back(Chain); Ops.push_back(Chain);
Ops.push_back(Callee); Ops.push_back(Callee);

View File

@ -635,7 +635,7 @@ SDNode *PPCDAGToDAGISel::SelectSETCC(SDNode *N) {
} }
case ISD::SETNE: { case ISD::SETNE: {
SDValue AD = SDValue AD =
SDValue(CurDAG->getMachineNode(PPC::ADDIC, dl, MVT::i32, MVT::Flag, SDValue(CurDAG->getMachineNode(PPC::ADDIC, dl, MVT::i32, MVT::Glue,
Op, getI32Imm(~0U)), 0); Op, getI32Imm(~0U)), 0);
return CurDAG->SelectNodeTo(N, PPC::SUBFE, MVT::i32, AD, Op, return CurDAG->SelectNodeTo(N, PPC::SUBFE, MVT::i32, AD, Op,
AD.getValue(1)); AD.getValue(1));
@ -657,7 +657,7 @@ SDNode *PPCDAGToDAGISel::SelectSETCC(SDNode *N) {
switch (CC) { switch (CC) {
default: break; default: break;
case ISD::SETEQ: case ISD::SETEQ:
Op = SDValue(CurDAG->getMachineNode(PPC::ADDIC, dl, MVT::i32, MVT::Flag, Op = SDValue(CurDAG->getMachineNode(PPC::ADDIC, dl, MVT::i32, MVT::Glue,
Op, getI32Imm(1)), 0); Op, getI32Imm(1)), 0);
return CurDAG->SelectNodeTo(N, PPC::ADDZE, MVT::i32, return CurDAG->SelectNodeTo(N, PPC::ADDZE, MVT::i32,
SDValue(CurDAG->getMachineNode(PPC::LI, dl, SDValue(CurDAG->getMachineNode(PPC::LI, dl,
@ -666,7 +666,7 @@ SDNode *PPCDAGToDAGISel::SelectSETCC(SDNode *N) {
Op.getValue(1)); Op.getValue(1));
case ISD::SETNE: { case ISD::SETNE: {
Op = SDValue(CurDAG->getMachineNode(PPC::NOR, dl, MVT::i32, Op, Op), 0); Op = SDValue(CurDAG->getMachineNode(PPC::NOR, dl, MVT::i32, Op, Op), 0);
SDNode *AD = CurDAG->getMachineNode(PPC::ADDIC, dl, MVT::i32, MVT::Flag, SDNode *AD = CurDAG->getMachineNode(PPC::ADDIC, dl, MVT::i32, MVT::Glue,
Op, getI32Imm(~0U)); Op, getI32Imm(~0U));
return CurDAG->SelectNodeTo(N, PPC::SUBFE, MVT::i32, SDValue(AD, 0), return CurDAG->SelectNodeTo(N, PPC::SUBFE, MVT::i32, SDValue(AD, 0),
Op, SDValue(AD, 1)); Op, SDValue(AD, 1));
@ -858,13 +858,13 @@ SDNode *PPCDAGToDAGISel::Select(SDNode *N) {
SDValue N0 = N->getOperand(0); SDValue N0 = N->getOperand(0);
if ((signed)Imm > 0 && isPowerOf2_32(Imm)) { if ((signed)Imm > 0 && isPowerOf2_32(Imm)) {
SDNode *Op = SDNode *Op =
CurDAG->getMachineNode(PPC::SRAWI, dl, MVT::i32, MVT::Flag, CurDAG->getMachineNode(PPC::SRAWI, dl, MVT::i32, MVT::Glue,
N0, getI32Imm(Log2_32(Imm))); N0, getI32Imm(Log2_32(Imm)));
return CurDAG->SelectNodeTo(N, PPC::ADDZE, MVT::i32, return CurDAG->SelectNodeTo(N, PPC::ADDZE, MVT::i32,
SDValue(Op, 0), SDValue(Op, 1)); SDValue(Op, 0), SDValue(Op, 1));
} else if ((signed)Imm < 0 && isPowerOf2_32(-Imm)) { } else if ((signed)Imm < 0 && isPowerOf2_32(-Imm)) {
SDNode *Op = SDNode *Op =
CurDAG->getMachineNode(PPC::SRAWI, dl, MVT::i32, MVT::Flag, CurDAG->getMachineNode(PPC::SRAWI, dl, MVT::i32, MVT::Glue,
N0, getI32Imm(Log2_32(-Imm))); N0, getI32Imm(Log2_32(-Imm)));
SDValue PT = SDValue PT =
SDValue(CurDAG->getMachineNode(PPC::ADDZE, dl, MVT::i32, SDValue(CurDAG->getMachineNode(PPC::ADDZE, dl, MVT::i32,
@ -1016,7 +1016,7 @@ SDNode *PPCDAGToDAGISel::Select(SDNode *N) {
// FIXME: Implement this optzn for PPC64. // FIXME: Implement this optzn for PPC64.
N->getValueType(0) == MVT::i32) { N->getValueType(0) == MVT::i32) {
SDNode *Tmp = SDNode *Tmp =
CurDAG->getMachineNode(PPC::ADDIC, dl, MVT::i32, MVT::Flag, CurDAG->getMachineNode(PPC::ADDIC, dl, MVT::i32, MVT::Glue,
N->getOperand(0), getI32Imm(~0U)); N->getOperand(0), getI32Imm(~0U));
return CurDAG->SelectNodeTo(N, PPC::SUBFE, MVT::i32, return CurDAG->SelectNodeTo(N, PPC::SUBFE, MVT::i32,
SDValue(Tmp, 0), N->getOperand(0), SDValue(Tmp, 0), N->getOperand(0),

View File

@ -2427,7 +2427,7 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,
EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy(); EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
NodeTys.push_back(MVT::Other); // Returns a chain NodeTys.push_back(MVT::Other); // Returns a chain
NodeTys.push_back(MVT::Flag); // Returns a flag for retval copy to use. NodeTys.push_back(MVT::Glue); // Returns a flag for retval copy to use.
unsigned CallOpc = isSVR4ABI ? PPCISD::CALL_SVR4 : PPCISD::CALL_Darwin; unsigned CallOpc = isSVR4ABI ? PPCISD::CALL_SVR4 : PPCISD::CALL_Darwin;
@ -2514,7 +2514,7 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,
// Load the address of the function entry point from the function // Load the address of the function entry point from the function
// descriptor. // descriptor.
SDVTList VTs = DAG.getVTList(MVT::i64, MVT::Other, MVT::Flag); SDVTList VTs = DAG.getVTList(MVT::i64, MVT::Other, MVT::Glue);
SDValue LoadFuncPtr = DAG.getNode(PPCISD::LOAD, dl, VTs, MTCTROps, SDValue LoadFuncPtr = DAG.getNode(PPCISD::LOAD, dl, VTs, MTCTROps,
InFlag.getNode() ? 3 : 2); InFlag.getNode() ? 3 : 2);
Chain = LoadFuncPtr.getValue(1); Chain = LoadFuncPtr.getValue(1);
@ -2541,7 +2541,7 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,
// prevents the register allocator from allocating it), resulting in an // prevents the register allocator from allocating it), resulting in an
// additional register being allocated and an unnecessary move instruction // additional register being allocated and an unnecessary move instruction
// being generated. // being generated.
VTs = DAG.getVTList(MVT::Other, MVT::Flag); VTs = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue LoadTOCPtr = DAG.getNode(PPCISD::LOAD_TOC, dl, VTs, Chain, SDValue LoadTOCPtr = DAG.getNode(PPCISD::LOAD_TOC, dl, VTs, Chain,
Callee, InFlag); Callee, InFlag);
Chain = LoadTOCPtr.getValue(0); Chain = LoadTOCPtr.getValue(0);
@ -2558,7 +2558,7 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,
NodeTys.clear(); NodeTys.clear();
NodeTys.push_back(MVT::Other); NodeTys.push_back(MVT::Other);
NodeTys.push_back(MVT::Flag); NodeTys.push_back(MVT::Glue);
Ops.push_back(Chain); Ops.push_back(Chain);
CallOpc = isSVR4ABI ? PPCISD::BCTRL_SVR4 : PPCISD::BCTRL_Darwin; CallOpc = isSVR4ABI ? PPCISD::BCTRL_SVR4 : PPCISD::BCTRL_Darwin;
Callee.setNode(0); Callee.setNode(0);
@ -2672,7 +2672,7 @@ PPCTargetLowering::FinishCall(CallingConv::ID CallConv, DebugLoc dl,
// stack frame. If caller and callee belong to the same module (and have the // stack frame. If caller and callee belong to the same module (and have the
// same TOC), the NOP will remain unchanged. // same TOC), the NOP will remain unchanged.
if (!isTailCall && PPCSubTarget.isSVR4ABI()&& PPCSubTarget.isPPC64()) { if (!isTailCall && PPCSubTarget.isSVR4ABI()&& PPCSubTarget.isPPC64()) {
SDVTList VTs = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList VTs = DAG.getVTList(MVT::Other, MVT::Glue);
if (CallOpc == PPCISD::BCTRL_SVR4) { if (CallOpc == PPCISD::BCTRL_SVR4) {
// This is a call through a function pointer. // This is a call through a function pointer.
// Restore the caller TOC from the save area into R2. // Restore the caller TOC from the save area into R2.
@ -2687,7 +2687,7 @@ PPCTargetLowering::FinishCall(CallingConv::ID CallConv, DebugLoc dl,
InFlag = Chain.getValue(1); InFlag = Chain.getValue(1);
} else { } else {
// Otherwise insert NOP. // Otherwise insert NOP.
InFlag = DAG.getNode(PPCISD::NOP, dl, MVT::Flag, InFlag); InFlag = DAG.getNode(PPCISD::NOP, dl, MVT::Glue, InFlag);
} }
} }
@ -3627,7 +3627,7 @@ SDValue PPCTargetLowering::LowerFLT_ROUNDS_(SDValue Op,
// Save FP Control Word to register // Save FP Control Word to register
NodeTys.push_back(MVT::f64); // return register NodeTys.push_back(MVT::f64); // return register
NodeTys.push_back(MVT::Flag); // unused in this context NodeTys.push_back(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
@ -4254,7 +4254,7 @@ SDValue PPCTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
}; };
std::vector<EVT> VTs; std::vector<EVT> VTs;
VTs.push_back(Op.getOperand(2).getValueType()); VTs.push_back(Op.getOperand(2).getValueType());
VTs.push_back(MVT::Flag); 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.
@ -4446,20 +4446,20 @@ void PPCTargetLowering::ReplaceNodeResults(SDNode *N,
SDValue Ops[4], Result, MFFSreg, InFlag, FPreg; SDValue Ops[4], Result, MFFSreg, InFlag, FPreg;
NodeTys.push_back(MVT::f64); // Return register NodeTys.push_back(MVT::f64); // Return register
NodeTys.push_back(MVT::Flag); // Returns a flag for later insns NodeTys.push_back(MVT::Glue); // Returns a flag for later insns
Result = DAG.getNode(PPCISD::MFFS, dl, NodeTys, &InFlag, 0); Result = DAG.getNode(PPCISD::MFFS, dl, NodeTys, &InFlag, 0);
MFFSreg = Result.getValue(0); MFFSreg = Result.getValue(0);
InFlag = Result.getValue(1); InFlag = Result.getValue(1);
NodeTys.clear(); NodeTys.clear();
NodeTys.push_back(MVT::Flag); // Returns a flag NodeTys.push_back(MVT::Glue); // Returns a flag
Ops[0] = DAG.getConstant(31, MVT::i32); Ops[0] = DAG.getConstant(31, MVT::i32);
Ops[1] = InFlag; Ops[1] = InFlag;
Result = DAG.getNode(PPCISD::MTFSB1, dl, NodeTys, Ops, 2); Result = DAG.getNode(PPCISD::MTFSB1, dl, NodeTys, Ops, 2);
InFlag = Result.getValue(0); InFlag = Result.getValue(0);
NodeTys.clear(); NodeTys.clear();
NodeTys.push_back(MVT::Flag); // Returns a flag NodeTys.push_back(MVT::Glue); // Returns a flag
Ops[0] = DAG.getConstant(30, MVT::i32); Ops[0] = DAG.getConstant(30, MVT::i32);
Ops[1] = InFlag; Ops[1] = InFlag;
Result = DAG.getNode(PPCISD::MTFSB0, dl, NodeTys, Ops, 2); Result = DAG.getNode(PPCISD::MTFSB0, dl, NodeTys, Ops, 2);
@ -4467,7 +4467,7 @@ void PPCTargetLowering::ReplaceNodeResults(SDNode *N,
NodeTys.clear(); NodeTys.clear();
NodeTys.push_back(MVT::f64); // result of add NodeTys.push_back(MVT::f64); // result of add
NodeTys.push_back(MVT::Flag); // Returns a flag NodeTys.push_back(MVT::Glue); // Returns a flag
Ops[0] = Lo; Ops[0] = Lo;
Ops[1] = Hi; Ops[1] = Hi;
Ops[2] = InFlag; Ops[2] = InFlag;
@ -5273,7 +5273,7 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,
DAG.getConstant(CompareOpc, MVT::i32) DAG.getConstant(CompareOpc, MVT::i32)
}; };
VTs.push_back(LHS.getOperand(2).getValueType()); VTs.push_back(LHS.getOperand(2).getValueType());
VTs.push_back(MVT::Flag); 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.

View File

@ -158,7 +158,7 @@ SDNode *SparcDAGToDAGISel::Select(SDNode *N) {
} else { } else {
TopPart = CurDAG->getRegister(SP::G0, MVT::i32); TopPart = CurDAG->getRegister(SP::G0, MVT::i32);
} }
TopPart = SDValue(CurDAG->getMachineNode(SP::WRYrr, dl, MVT::Flag, TopPart, TopPart = SDValue(CurDAG->getMachineNode(SP::WRYrr, dl, MVT::Glue, TopPart,
CurDAG->getRegister(SP::G0, MVT::i32)), 0); CurDAG->getRegister(SP::G0, MVT::i32)), 0);
// FIXME: Handle div by immediate. // FIXME: Handle div by immediate.
@ -172,7 +172,7 @@ SDNode *SparcDAGToDAGISel::Select(SDNode *N) {
SDValue MulLHS = N->getOperand(0); SDValue MulLHS = N->getOperand(0);
SDValue MulRHS = N->getOperand(1); SDValue MulRHS = N->getOperand(1);
unsigned Opcode = N->getOpcode() == ISD::MULHU ? SP::UMULrr : SP::SMULrr; unsigned Opcode = N->getOpcode() == ISD::MULHU ? SP::UMULrr : SP::SMULrr;
SDNode *Mul = CurDAG->getMachineNode(Opcode, dl, MVT::i32, MVT::Flag, SDNode *Mul = CurDAG->getMachineNode(Opcode, dl, MVT::i32, MVT::Glue,
MulLHS, MulRHS); MulLHS, MulRHS);
// The high part is in the Y register. // The high part is in the Y register.
return CurDAG->SelectNodeTo(N, SP::RDY, MVT::i32, SDValue(Mul, 1)); return CurDAG->SelectNodeTo(N, SP::RDY, MVT::i32, SDValue(Mul, 1));

View File

@ -488,7 +488,7 @@ SparcTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
std::vector<EVT> NodeTys; std::vector<EVT> NodeTys;
NodeTys.push_back(MVT::Other); // Returns a chain NodeTys.push_back(MVT::Other); // Returns a chain
NodeTys.push_back(MVT::Flag); // Returns a flag for retval copy to use. NodeTys.push_back(MVT::Glue); // Returns a flag for retval copy to use.
SDValue Ops[] = { Chain, Callee, InFlag }; SDValue Ops[] = { Chain, Callee, InFlag };
Chain = DAG.getNode(SPISD::CALL, dl, NodeTys, Ops, InFlag.getNode() ? 3 : 2); Chain = DAG.getNode(SPISD::CALL, dl, NodeTys, Ops, InFlag.getNode() ? 3 : 2);
InFlag = Chain.getValue(1); InFlag = Chain.getValue(1);
@ -834,13 +834,13 @@ static SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG) {
if (LHS.getValueType() == MVT::i32) { if (LHS.getValueType() == MVT::i32) {
std::vector<EVT> VTs; std::vector<EVT> VTs;
VTs.push_back(MVT::i32); VTs.push_back(MVT::i32);
VTs.push_back(MVT::Flag); 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);
Opc = SPISD::BRICC; Opc = SPISD::BRICC;
} else { } else {
CompareFlag = DAG.getNode(SPISD::CMPFCC, dl, MVT::Flag, LHS, RHS); CompareFlag = DAG.getNode(SPISD::CMPFCC, dl, MVT::Glue, LHS, RHS);
if (SPCC == ~0U) SPCC = FPCondCCodeToFCC(CC); if (SPCC == ~0U) SPCC = FPCondCCodeToFCC(CC);
Opc = SPISD::BRFCC; Opc = SPISD::BRFCC;
} }
@ -865,13 +865,13 @@ static SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) {
if (LHS.getValueType() == MVT::i32) { if (LHS.getValueType() == MVT::i32) {
std::vector<EVT> VTs; std::vector<EVT> VTs;
VTs.push_back(LHS.getValueType()); // subcc returns a value VTs.push_back(LHS.getValueType()); // subcc returns a value
VTs.push_back(MVT::Flag); 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;
if (SPCC == ~0U) SPCC = IntCondCCodeToICC(CC); if (SPCC == ~0U) SPCC = IntCondCCodeToICC(CC);
} else { } else {
CompareFlag = DAG.getNode(SPISD::CMPFCC, dl, MVT::Flag, LHS, RHS); CompareFlag = DAG.getNode(SPISD::CMPFCC, dl, MVT::Glue, LHS, RHS);
Opc = SPISD::SELECT_FCC; Opc = SPISD::SELECT_FCC;
if (SPCC == ~0U) SPCC = FPCondCCodeToFCC(CC); if (SPCC == ~0U) SPCC = FPCondCCodeToFCC(CC);
} }

View File

@ -471,7 +471,7 @@ SystemZTargetLowering::LowerCCCCallTo(SDValue Chain, SDValue Callee,
Callee = DAG.getTargetExternalSymbol(E->getSymbol(), getPointerTy()); Callee = DAG.getTargetExternalSymbol(E->getSymbol(), getPointerTy());
// Returns a chain & a flag for retval copy to use. // Returns a chain & a flag for retval copy to use.
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
SmallVector<SDValue, 8> Ops; SmallVector<SDValue, 8> Ops;
Ops.push_back(Chain); Ops.push_back(Chain);
Ops.push_back(Callee); Ops.push_back(Callee);
@ -710,7 +710,7 @@ SDValue SystemZTargetLowering::LowerSELECT_CC(SDValue Op,
SDValue SystemZCC; SDValue SystemZCC;
SDValue Flag = EmitCmp(LHS, RHS, CC, SystemZCC, DAG); SDValue Flag = EmitCmp(LHS, RHS, CC, SystemZCC, DAG);
SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Flag); SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Glue);
SmallVector<SDValue, 4> Ops; SmallVector<SDValue, 4> Ops;
Ops.push_back(TrueV); Ops.push_back(TrueV);
Ops.push_back(FalseV); Ops.push_back(FalseV);

View File

@ -1675,14 +1675,14 @@ SDNode *X86DAGToDAGISel::Select(SDNode *Node) {
SDValue Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Tmp4, N1.getOperand(0), SDValue Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Tmp4, N1.getOperand(0),
InFlag }; InFlag };
SDNode *CNode = SDNode *CNode =
CurDAG->getMachineNode(MOpc, dl, MVT::Other, MVT::Flag, Ops, CurDAG->getMachineNode(MOpc, dl, MVT::Other, MVT::Glue, Ops,
array_lengthof(Ops)); array_lengthof(Ops));
InFlag = SDValue(CNode, 1); InFlag = SDValue(CNode, 1);
// Update the chain. // Update the chain.
ReplaceUses(N1.getValue(1), SDValue(CNode, 0)); ReplaceUses(N1.getValue(1), SDValue(CNode, 0));
} else { } else {
SDNode *CNode = CurDAG->getMachineNode(Opc, dl, MVT::Flag, N1, InFlag); SDNode *CNode = CurDAG->getMachineNode(Opc, dl, MVT::Glue, N1, InFlag);
InFlag = SDValue(CNode, 0); InFlag = SDValue(CNode, 0);
} }
@ -1807,7 +1807,7 @@ SDNode *X86DAGToDAGISel::Select(SDNode *Node) {
if (isSigned && !signBitIsZero) { if (isSigned && !signBitIsZero) {
// Sign extend the low part into the high part. // Sign extend the low part into the high part.
InFlag = InFlag =
SDValue(CurDAG->getMachineNode(SExtOpcode, dl, MVT::Flag, InFlag),0); SDValue(CurDAG->getMachineNode(SExtOpcode, dl, MVT::Glue, InFlag),0);
} else { } else {
// Zero out the high part, effectively zero extending the input. // Zero out the high part, effectively zero extending the input.
SDValue ClrNode = SDValue ClrNode =
@ -1821,14 +1821,14 @@ SDNode *X86DAGToDAGISel::Select(SDNode *Node) {
SDValue Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Tmp4, N1.getOperand(0), SDValue Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Tmp4, N1.getOperand(0),
InFlag }; InFlag };
SDNode *CNode = SDNode *CNode =
CurDAG->getMachineNode(MOpc, dl, MVT::Other, MVT::Flag, Ops, CurDAG->getMachineNode(MOpc, dl, MVT::Other, MVT::Glue, Ops,
array_lengthof(Ops)); array_lengthof(Ops));
InFlag = SDValue(CNode, 1); InFlag = SDValue(CNode, 1);
// Update the chain. // Update the chain.
ReplaceUses(N1.getValue(1), SDValue(CNode, 0)); ReplaceUses(N1.getValue(1), SDValue(CNode, 0));
} else { } else {
InFlag = InFlag =
SDValue(CurDAG->getMachineNode(Opc, dl, MVT::Flag, N1, InFlag), 0); SDValue(CurDAG->getMachineNode(Opc, dl, MVT::Glue, N1, InFlag), 0);
} }
// Prevent use of AH in a REX instruction by referencing AX instead. // Prevent use of AH in a REX instruction by referencing AX instead.

View File

@ -256,7 +256,7 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
setOperationAction(ISD::SREM, VT, Expand); setOperationAction(ISD::SREM, VT, Expand);
setOperationAction(ISD::UREM, VT, Expand); setOperationAction(ISD::UREM, VT, Expand);
// Add/Sub overflow ops with MVT::Flags are lowered to EFLAGS dependences. // Add/Sub overflow ops with MVT::Glues are lowered to EFLAGS dependences.
setOperationAction(ISD::ADDC, VT, Custom); setOperationAction(ISD::ADDC, VT, Custom);
setOperationAction(ISD::ADDE, VT, Custom); setOperationAction(ISD::ADDE, VT, Custom);
setOperationAction(ISD::SUBC, VT, Custom); setOperationAction(ISD::SUBC, VT, Custom);
@ -1400,7 +1400,7 @@ X86TargetLowering::LowerCallResult(SDValue Chain, SDValue InFlag,
if (CopyVT == MVT::f64) Opc = isST0 ? X86::FpGET_ST0_64:X86::FpGET_ST1_64; if (CopyVT == MVT::f64) Opc = isST0 ? X86::FpGET_ST0_64:X86::FpGET_ST1_64;
if (CopyVT == MVT::f80) Opc = isST0 ? X86::FpGET_ST0_80:X86::FpGET_ST1_80; if (CopyVT == MVT::f80) Opc = isST0 ? X86::FpGET_ST0_80:X86::FpGET_ST1_80;
SDValue Ops[] = { Chain, InFlag }; SDValue Ops[] = { Chain, InFlag };
Chain = SDValue(DAG.getMachineNode(Opc, dl, CopyVT, MVT::Other, MVT::Flag, Chain = SDValue(DAG.getMachineNode(Opc, dl, CopyVT, MVT::Other, MVT::Glue,
Ops, 2), 1); Ops, 2), 1);
Val = Chain.getValue(0); Val = Chain.getValue(0);
@ -2177,7 +2177,7 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
} }
// Returns a chain & a flag for retval copy to use. // Returns a chain & a flag for retval copy to use.
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
SmallVector<SDValue, 8> Ops; SmallVector<SDValue, 8> Ops;
if (!IsSibcall && isTailCall) { if (!IsSibcall && isTailCall) {
@ -6034,7 +6034,7 @@ GetTLSADDR(SelectionDAG &DAG, SDValue Chain, GlobalAddressSDNode *GA,
SDValue *InFlag, const EVT PtrVT, unsigned ReturnReg, SDValue *InFlag, const EVT PtrVT, unsigned ReturnReg,
unsigned char OperandFlags) { unsigned char OperandFlags) {
MachineFrameInfo *MFI = DAG.getMachineFunction().getFrameInfo(); MachineFrameInfo *MFI = DAG.getMachineFunction().getFrameInfo();
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
DebugLoc dl = GA->getDebugLoc(); DebugLoc dl = GA->getDebugLoc();
SDValue TGA = DAG.getTargetGlobalAddress(GA->getGlobal(), dl, SDValue TGA = DAG.getTargetGlobalAddress(GA->getGlobal(), dl,
GA->getValueType(0), GA->getValueType(0),
@ -6183,7 +6183,7 @@ X86TargetLowering::LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const {
// Lowering the machine isd will make sure everything is in the right // Lowering the machine isd will make sure everything is in the right
// location. // location.
SDValue Chain = DAG.getEntryNode(); SDValue Chain = DAG.getEntryNode();
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue Args[] = { Chain, Offset }; SDValue Args[] = { Chain, Offset };
Chain = DAG.getNode(X86ISD::TLSCALL, DL, NodeTys, Args, 2); Chain = DAG.getNode(X86ISD::TLSCALL, DL, NodeTys, Args, 2);
@ -6290,7 +6290,7 @@ SDValue X86TargetLowering::BuildFILD(SDValue Op, EVT SrcVT, SDValue Chain,
SDVTList Tys; SDVTList Tys;
bool useSSE = isScalarFPTypeInSSEReg(Op.getValueType()); bool useSSE = isScalarFPTypeInSSEReg(Op.getValueType());
if (useSSE) if (useSSE)
Tys = DAG.getVTList(MVT::f64, MVT::Other, MVT::Flag); Tys = DAG.getVTList(MVT::f64, MVT::Other, MVT::Glue);
else else
Tys = DAG.getVTList(Op.getValueType(), MVT::Other); Tys = DAG.getVTList(Op.getValueType(), MVT::Other);
@ -7313,7 +7313,7 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
// X86ISD::CMOV means set the result (which is operand 1) to the RHS if // X86ISD::CMOV means set the result (which is operand 1) to the RHS if
// condition is true. // condition is true.
SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Flag); SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Glue);
SDValue Ops[] = { Op2, Op1, CC, Cond }; SDValue Ops[] = { Op2, Op1, CC, Cond };
return DAG.getNode(X86ISD::CMOV, DL, VTs, Ops, array_lengthof(Ops)); return DAG.getNode(X86ISD::CMOV, DL, VTs, Ops, array_lengthof(Ops));
} }
@ -7514,7 +7514,7 @@ X86TargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op,
Chain = DAG.getCopyToReg(Chain, dl, X86::EAX, Size, Flag); Chain = DAG.getCopyToReg(Chain, dl, X86::EAX, Size, Flag);
Flag = Chain.getValue(1); Flag = Chain.getValue(1);
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
Chain = DAG.getNode(X86ISD::WIN_ALLOCA, dl, NodeTys, Chain, Flag); Chain = DAG.getNode(X86ISD::WIN_ALLOCA, dl, NodeTys, Chain, Flag);
Flag = Chain.getValue(1); Flag = Chain.getValue(1);
@ -8569,7 +8569,7 @@ SDValue X86TargetLowering::LowerCMP_SWAP(SDValue Op, SelectionDAG &DAG) const {
Op.getOperand(3), Op.getOperand(3),
DAG.getTargetConstant(size, MVT::i8), DAG.getTargetConstant(size, MVT::i8),
cpIn.getValue(1) }; cpIn.getValue(1) };
SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Glue);
MachineMemOperand *MMO = cast<AtomicSDNode>(Op)->getMemOperand(); MachineMemOperand *MMO = cast<AtomicSDNode>(Op)->getMemOperand();
SDValue Result = DAG.getMemIntrinsicNode(X86ISD::LCMPXCHG_DAG, DL, Tys, SDValue Result = DAG.getMemIntrinsicNode(X86ISD::LCMPXCHG_DAG, DL, Tys,
Ops, 5, T, MMO); Ops, 5, T, MMO);
@ -8581,7 +8581,7 @@ SDValue X86TargetLowering::LowerCMP_SWAP(SDValue Op, SelectionDAG &DAG) const {
SDValue X86TargetLowering::LowerREADCYCLECOUNTER(SDValue Op, SDValue X86TargetLowering::LowerREADCYCLECOUNTER(SDValue Op,
SelectionDAG &DAG) const { SelectionDAG &DAG) const {
assert(Subtarget->is64Bit() && "Result not type legalized?"); assert(Subtarget->is64Bit() && "Result not type legalized?");
SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue TheChain = Op.getOperand(0); SDValue TheChain = Op.getOperand(0);
DebugLoc dl = Op.getDebugLoc(); DebugLoc dl = Op.getDebugLoc();
SDValue rd = DAG.getNode(X86ISD::RDTSC_DAG, dl, Tys, &TheChain, 1); SDValue rd = DAG.getNode(X86ISD::RDTSC_DAG, dl, Tys, &TheChain, 1);
@ -8775,7 +8775,7 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N,
return; return;
} }
case ISD::READCYCLECOUNTER: { case ISD::READCYCLECOUNTER: {
SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue TheChain = N->getOperand(0); SDValue TheChain = N->getOperand(0);
SDValue rd = DAG.getNode(X86ISD::RDTSC_DAG, dl, Tys, &TheChain, 1); SDValue rd = DAG.getNode(X86ISD::RDTSC_DAG, dl, Tys, &TheChain, 1);
SDValue eax = DAG.getCopyFromReg(rd, dl, X86::EAX, MVT::i32, SDValue eax = DAG.getCopyFromReg(rd, dl, X86::EAX, MVT::i32,
@ -8811,7 +8811,7 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N,
SDValue Ops[] = { swapInH.getValue(0), SDValue Ops[] = { swapInH.getValue(0),
N->getOperand(1), N->getOperand(1),
swapInH.getValue(1) }; swapInH.getValue(1) };
SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Glue);
MachineMemOperand *MMO = cast<AtomicSDNode>(N)->getMemOperand(); MachineMemOperand *MMO = cast<AtomicSDNode>(N)->getMemOperand();
SDValue Result = DAG.getMemIntrinsicNode(X86ISD::LCMPXCHG8_DAG, dl, Tys, SDValue Result = DAG.getMemIntrinsicNode(X86ISD::LCMPXCHG8_DAG, dl, Tys,
Ops, 3, T, MMO); Ops, 3, T, MMO);

View File

@ -136,7 +136,7 @@ X86SelectionDAGInfo::EmitTargetCodeForMemset(SelectionDAG &DAG, DebugLoc dl,
Dst, InFlag); Dst, InFlag);
InFlag = Chain.getValue(1); InFlag = Chain.getValue(1);
SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, DAG.getValueType(AVT), InFlag }; SDValue Ops[] = { Chain, DAG.getValueType(AVT), InFlag };
Chain = DAG.getNode(X86ISD::REP_STOS, dl, Tys, Ops, array_lengthof(Ops)); Chain = DAG.getNode(X86ISD::REP_STOS, dl, Tys, Ops, array_lengthof(Ops));
@ -150,7 +150,7 @@ X86SelectionDAGInfo::EmitTargetCodeForMemset(SelectionDAG &DAG, DebugLoc dl,
X86::ECX, X86::ECX,
Left, InFlag); Left, InFlag);
InFlag = Chain.getValue(1); InFlag = Chain.getValue(1);
Tys = DAG.getVTList(MVT::Other, MVT::Flag); Tys = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, DAG.getValueType(MVT::i8), InFlag }; SDValue Ops[] = { Chain, DAG.getValueType(MVT::i8), InFlag };
Chain = DAG.getNode(X86ISD::REP_STOS, dl, Tys, Ops, array_lengthof(Ops)); Chain = DAG.getNode(X86ISD::REP_STOS, dl, Tys, Ops, array_lengthof(Ops));
} else if (BytesLeft) { } else if (BytesLeft) {
@ -230,7 +230,7 @@ X86SelectionDAGInfo::EmitTargetCodeForMemcpy(SelectionDAG &DAG, DebugLoc dl,
Src, InFlag); Src, InFlag);
InFlag = Chain.getValue(1); InFlag = Chain.getValue(1);
SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue Ops[] = { Chain, DAG.getValueType(AVT), InFlag }; SDValue Ops[] = { Chain, DAG.getValueType(AVT), InFlag };
SDValue RepMovs = DAG.getNode(X86ISD::REP_MOVS, dl, Tys, Ops, SDValue RepMovs = DAG.getNode(X86ISD::REP_MOVS, dl, Tys, Ops,
array_lengthof(Ops)); array_lengthof(Ops));

View File

@ -926,7 +926,7 @@ XCoreTargetLowering::LowerCCCCallTo(SDValue Chain, SDValue Callee,
// = Chain, Callee, Reg#1, Reg#2, ... // = Chain, Callee, Reg#1, Reg#2, ...
// //
// Returns a chain & a flag for retval copy to use. // Returns a chain & a flag for retval copy to use.
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
SmallVector<SDValue, 8> Ops; SmallVector<SDValue, 8> Ops;
Ops.push_back(Chain); Ops.push_back(Chain);
Ops.push_back(Callee); Ops.push_back(Callee);

View File

@ -109,7 +109,7 @@ std::string EVT::getEVTString() const {
case MVT::ppcf128: return "ppcf128"; case MVT::ppcf128: return "ppcf128";
case MVT::isVoid: return "isVoid"; case MVT::isVoid: return "isVoid";
case MVT::Other: return "ch"; case MVT::Other: return "ch";
case MVT::Flag: return "flag"; case MVT::Glue: return "glue";
case MVT::x86mmx: return "x86mmx"; case MVT::x86mmx: return "x86mmx";
case MVT::v2i8: return "v2i8"; case MVT::v2i8: return "v2i8";
case MVT::v4i8: return "v4i8"; case MVT::v4i8: return "v4i8";

View File

@ -64,7 +64,7 @@ std::string llvm::getEnumName(MVT::SimpleValueType T) {
case MVT::f128: return "MVT::f128"; case MVT::f128: return "MVT::f128";
case MVT::ppcf128: return "MVT::ppcf128"; case MVT::ppcf128: return "MVT::ppcf128";
case MVT::x86mmx: return "MVT::x86mmx"; case MVT::x86mmx: return "MVT::x86mmx";
case MVT::Flag: return "MVT::Flag"; case MVT::Glue: return "MVT::Glue";
case MVT::isVoid: return "MVT::isVoid"; case MVT::isVoid: return "MVT::isVoid";
case MVT::v2i8: return "MVT::v2i8"; case MVT::v2i8: return "MVT::v2i8";
case MVT::v4i8: return "MVT::v4i8"; case MVT::v4i8: return "MVT::v4i8";

View File

@ -787,7 +787,7 @@ EmitResultInstructionAsOperand(const TreePatternNode *N,
// The non-chain and non-flag results of the newly emitted node get recorded. // The non-chain and non-flag results of the newly emitted node get recorded.
for (unsigned i = 0, e = ResultVTs.size(); i != e; ++i) { for (unsigned i = 0, e = ResultVTs.size(); i != e; ++i) {
if (ResultVTs[i] == MVT::Other || ResultVTs[i] == MVT::Flag) break; if (ResultVTs[i] == MVT::Other || ResultVTs[i] == MVT::Glue) break;
OutputOps.push_back(NextRecordedOperandNo++); OutputOps.push_back(NextRecordedOperandNo++);
} }
} }