diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-12-21 02:38:05 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-12-21 02:38:05 +0000 | 
| commit | f1b4eafbfec976f939ec0ea3e8acf91cef5363e3 (patch) | |
| tree | 5c9af32dc8749815858e0e2b5a57de754774e74d /lib | |
| parent | 6e90ce21cc2b0627ee9219e3fb0cf808f2b73328 (diff) | |
| download | external_llvm-f1b4eafbfec976f939ec0ea3e8acf91cef5363e3.zip external_llvm-f1b4eafbfec976f939ec0ea3e8acf91cef5363e3.tar.gz external_llvm-f1b4eafbfec976f939ec0ea3e8acf91cef5363e3.tar.bz2  | |
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
Diffstat (limited to 'lib')
33 files changed, 143 insertions, 143 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index c1288d5..cd37c27 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -1457,7 +1457,7 @@ SDValue DAGCombiner::visitADDC(SDNode *N) {    if (N->hasNUsesOfValue(0, 1))      return CombineTo(N, DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N1, N0),                       DAG.getNode(ISD::CARRY_FALSE, -                                 N->getDebugLoc(), MVT::Flag)); +                                 N->getDebugLoc(), MVT::Glue));    // canonicalize constant to RHS.    if (N0C && !N1C) @@ -1466,7 +1466,7 @@ SDValue DAGCombiner::visitADDC(SDNode *N) {    // fold (addc x, 0) -> x + no carry out    if (N1C && N1C->isNullValue())      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.    APInt LHSZero, LHSOne; @@ -1483,7 +1483,7 @@ SDValue DAGCombiner::visitADDC(SDNode *N) {          (LHSZero & (~RHSZero & Mask)) == (~RHSZero & Mask))        return CombineTo(N, DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N0, N1),                         DAG.getNode(ISD::CARRY_FALSE, -                                   N->getDebugLoc(), MVT::Flag)); +                                   N->getDebugLoc(), MVT::Glue));    }    return SDValue(); diff --git a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp index 86f88f1..c334cf8 100644 --- a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp +++ b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp @@ -35,7 +35,7 @@ using namespace llvm;  /// not go into the resulting MachineInstr).  unsigned InstrEmitter::CountResults(SDNode *Node) {    unsigned N = Node->getNumValues(); -  while (N && Node->getValueType(N - 1) == MVT::Flag) +  while (N && Node->getValueType(N - 1) == MVT::Glue)      --N;    if (N && Node->getValueType(N - 1) == MVT::Other)      --N;    // Skip over chain result. @@ -48,7 +48,7 @@ unsigned InstrEmitter::CountResults(SDNode *Node) {  /// MachineInstr.  unsigned InstrEmitter::CountOperands(SDNode *Node) {    unsigned N = Node->getNumOperands(); -  while (N && Node->getOperand(N - 1).getValueType() == MVT::Flag) +  while (N && Node->getOperand(N - 1).getValueType() == MVT::Glue)      --N;    if (N && Node->getOperand(N - 1).getValueType() == MVT::Other)      --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)              continue;            EVT VT = Node->getValueType(Op.getResNo()); -          if (VT == MVT::Other || VT == MVT::Flag) +          if (VT == MVT::Other || VT == MVT::Glue)              continue;            Match = false;            if (User->isMachineOpcode()) { @@ -264,7 +264,7 @@ InstrEmitter::AddRegisterOperand(MachineInstr *MI, SDValue Op,                                   DenseMap<SDValue, unsigned> &VRBaseMap,                                   bool IsDebug, bool IsClone, bool IsCloned) {    assert(Op.getValueType() != MVT::Other && -         Op.getValueType() != MVT::Flag && +         Op.getValueType() != MVT::Glue &&           "Chain and flag operands should occur at end of operand list!");    // Get/emit the operand.    unsigned VReg = getVR(Op, VRBaseMap); @@ -377,7 +377,7 @@ void InstrEmitter::AddOperand(MachineInstr *MI, SDValue Op,                                              BA->getTargetFlags()));    } else {      assert(Op.getValueType() != MVT::Other && -           Op.getValueType() != MVT::Flag && +           Op.getValueType() != MVT::Glue &&             "Chain and flag operands should occur at end of operand list!");      AddRegisterOperand(MI, Op, IIOpNum, II, VRBaseMap,                         IsDebug, IsClone, IsCloned); @@ -671,7 +671,7 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,    // The MachineInstr constructor adds implicit-def operands. Scan through    // these to determine which are dead.    if (MI->getNumOperands() != 0 && -      Node->getValueType(Node->getNumValues()-1) == MVT::Flag) { +      Node->getValueType(Node->getNumValues()-1) == MVT::Glue) {      // First, collect all used registers.      SmallVector<unsigned, 8> UsedRegs;      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        // node has a Flag value, for the benefit of targets still using        // 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);      }    } @@ -737,7 +737,7 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,    // 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    // 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()) {        for (unsigned i = NumResults, e = II.getNumDefs()+II.getNumImplicitDefs();             i != e; ++i) @@ -793,7 +793,7 @@ EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned,    case ISD::INLINEASM: {      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.      // Create the inline asm machine instruction. diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index de6863a..661a7ad 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1085,7 +1085,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {      Tmp1 = LegalizeOp(Node->getOperand(0));  // Legalize the chain.      // Do not try to legalize the target-specific arguments (#1+), except for      // 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)) {          SmallVector<SDValue, 8> Ops(Node->op_begin(), Node->op_end());          Ops[0] = Tmp1; diff --git a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp index b9e5599..1b04c5e 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp @@ -1075,7 +1075,7 @@ void DAGTypeLegalizer::ExpandShiftByConstant(SDNode *N, unsigned Amt,                 TLI.isOperationLegalOrCustom(ISD::ADDC,                                TLI.getTypeToExpandTo(*DAG.getContext(), NVT))) {        // 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 };        Lo = DAG.getNode(ISD::ADDC, dl, VTList, LoOps, 2);        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    // them.  TODO: Teach operation legalization how to expand unsupported    // 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.    bool hasCarry =      TLI.isOperationLegalOrCustom(N->getOpcode() == ISD::ADD ? @@ -1318,7 +1318,7 @@ void DAGTypeLegalizer::ExpandIntRes_ADDSUB(SDNode *N,                                   TLI.getTypeToExpandTo(*DAG.getContext(), NVT));    if (hasCarry) { -    SDVTList VTList = DAG.getVTList(NVT, MVT::Flag); +    SDVTList VTList = DAG.getVTList(NVT, MVT::Glue);      if (N->getOpcode() == ISD::ADD) {        Lo = DAG.getNode(ISD::ADDC, dl, VTList, LoOps, 2);        HiOps[2] = Lo.getValue(1); @@ -1364,7 +1364,7 @@ void DAGTypeLegalizer::ExpandIntRes_ADDSUBC(SDNode *N,    DebugLoc dl = N->getDebugLoc();    GetExpandedInteger(N->getOperand(0), LHSL, LHSH);    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 HiOps[3] = { LHSH, RHSH }; @@ -1390,7 +1390,7 @@ void DAGTypeLegalizer::ExpandIntRes_ADDSUBE(SDNode *N,    DebugLoc dl = N->getDebugLoc();    GetExpandedInteger(N->getOperand(0), LHSL, LHSH);    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 HiOps[3] = { LHSH, RHSH }; diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp index fae2729..732a3f3 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp @@ -216,7 +216,7 @@ SUnit *ScheduleDAGFast::CopyAndMoveSuccessors(SUnit *SU) {    bool TryUnfold = false;    for (unsigned i = 0, e = N->getNumValues(); i != e; ++i) {      EVT VT = N->getValueType(i); -    if (VT == MVT::Flag) +    if (VT == MVT::Glue)        return NULL;      else if (VT == MVT::Other)        TryUnfold = true; @@ -224,7 +224,7 @@ SUnit *ScheduleDAGFast::CopyAndMoveSuccessors(SUnit *SU) {    for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {      const SDValue &Op = N->getOperand(i);      EVT VT = Op.getNode()->getValueType(Op.getResNo()); -    if (VT == MVT::Flag) +    if (VT == MVT::Glue)        return NULL;    } @@ -480,7 +480,7 @@ bool ScheduleDAGFast::DelayForLiveRegsBottomUp(SUnit *SU,      if (Node->getOpcode() == ISD::INLINEASM) {        // Inline asm can clobber physical defs.        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.        for (unsigned i = InlineAsm::Op_FirstOperand; i != NumOps;) { diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index 72bfe71..c973328 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -401,7 +401,7 @@ SUnit *ScheduleDAGRRList::CopyAndMoveSuccessors(SUnit *SU) {    bool TryUnfold = false;    for (unsigned i = 0, e = N->getNumValues(); i != e; ++i) {      EVT VT = N->getValueType(i); -    if (VT == MVT::Flag) +    if (VT == MVT::Glue)        return NULL;      else if (VT == MVT::Other)        TryUnfold = true; @@ -409,7 +409,7 @@ SUnit *ScheduleDAGRRList::CopyAndMoveSuccessors(SUnit *SU) {    for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {      const SDValue &Op = N->getOperand(i);      EVT VT = Op.getNode()->getValueType(Op.getResNo()); -    if (VT == MVT::Flag) +    if (VT == MVT::Glue)        return NULL;    } @@ -671,7 +671,7 @@ DelayForLiveRegsBottomUp(SUnit *SU, SmallVector<unsigned, 4> &LRegs) {      if (Node->getOpcode() == ISD::INLINEASM) {        // Inline asm can clobber physical defs.        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.        for (unsigned i = InlineAsm::Op_FirstOperand; i != NumOps;) { @@ -1410,7 +1410,7 @@ namespace {          unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs();          for (unsigned i = NumDefs, e = N->getNumValues(); i != e; ++i) {            EVT VT = N->getValueType(i); -          if (VT == MVT::Flag || VT == MVT::Other) +          if (VT == MVT::Glue || VT == MVT::Other)              continue;            if (!N->hasAnyUseOfValue(i))              continue; @@ -1724,7 +1724,7 @@ static bool canClobberPhysRegDefs(const SUnit *SuccSU, const SUnit *SU,        return false;      for (unsigned i = NumDefs, e = N->getNumValues(); i != e; ++i) {        EVT VT = N->getValueType(i); -      if (VT == MVT::Flag || VT == MVT::Other) +      if (VT == MVT::Glue || VT == MVT::Other)          continue;        if (!N->hasAnyUseOfValue(i))          continue; diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp index 429b115..0c3232b 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp @@ -118,13 +118,13 @@ static void AddFlags(SDNode *N, SDValue Flag, bool AddFlag,    if (FlagDestNode == N) return;    // 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)      VTs.push_back(N->getValueType(I));    if (AddFlag) -    VTs.push_back(MVT::Flag); +    VTs.push_back(MVT::Glue);    SmallVector<SDValue, 4> Ops;    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.  /// 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  /// optimization may benefit some targets by improving cache locality.  void ScheduleDAGSDNodes::ClusterNeighboringLoads(SDNode *Node) { @@ -214,7 +214,7 @@ void ScheduleDAGSDNodes::ClusterNeighboringLoads(SDNode *Node) {    if (NumLoads == 0)      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.    SDNode *Lead = Loads[0];    AddFlags(Lead, SDValue(0, 0), true, DAG); @@ -297,7 +297,7 @@ void ScheduleDAGSDNodes::BuildSchedUnits() {      // Scan up to find flagged preds.      SDNode *N = NI;      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();        assert(N->getNodeId() == -1 && "Node already inserted!");        N->setNodeId(NodeSUnit->NodeNum); @@ -307,7 +307,7 @@ void ScheduleDAGSDNodes::BuildSchedUnits() {      // Scan down to find any flagged succs.      N = NI; -    while (N->getValueType(N->getNumValues()-1) == MVT::Flag) { +    while (N->getValueType(N->getNumValues()-1) == MVT::Glue) {        SDValue FlagVal(N, N->getNumValues()-1);        // 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.          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;          unsigned PhysReg = 0; diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h index 8008ef8..00b3556 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h @@ -26,7 +26,7 @@ namespace llvm {    /// SDNodes such as Constants, Registers, and a few others that are not    /// 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.    ///    /// SDNode-based scheduling graphs do not use SDep::Anti or SDep::Output diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 019c9fe..9b2a601 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -491,7 +491,7 @@ encodeMemSDNodeFlags(int ConvType, ISD::MemIndexedMode AM, bool isVolatile,  /// doNotCSE - Return true if CSE should not be performed for this node.  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.    switch (N->getOpcode()) { @@ -503,7 +503,7 @@ static bool doNotCSE(SDNode *N) {    // Check that remaining values produced are not flags.    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 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    // flag result (which cannot be CSE'd) or is one of the special cases that are    // 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->dump(this);      dbgs() << "\n"; @@ -2564,7 +2564,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL,    SDNode *N;    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;      SDValue Ops[1] = { Operand };      AddNodeIDNode(ID, Opcode, VTs, Ops, 1); @@ -3006,7 +3006,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,    // Memoize this node if possible.    SDNode *N;    SDVTList VTs = getVTList(VT); -  if (VT != MVT::Flag) { +  if (VT != MVT::Glue) {      SDValue Ops[] = { N1, N2 };      FoldingSetNodeID ID;      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.    SDNode *N;    SDVTList VTs = getVTList(VT); -  if (VT != MVT::Flag) { +  if (VT != MVT::Glue) {      SDValue Ops[] = { N1, N2, N3 };      FoldingSetNodeID ID;      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.    MemIntrinsicSDNode *N; -  if (VTList.VTs[VTList.NumVTs-1] != MVT::Flag) { +  if (VTList.VTs[VTList.NumVTs-1] != MVT::Glue) {      FoldingSetNodeID ID;      AddNodeIDNode(ID, Opcode, VTList, Ops, NumOps);      void *IP = 0; @@ -4238,7 +4238,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,    SDNode *N;    SDVTList VTs = getVTList(VT); -  if (VT != MVT::Flag) { +  if (VT != MVT::Glue) {      FoldingSetNodeID ID;      AddNodeIDNode(ID, Opcode, VTs, Ops, NumOps);      void *IP = 0; @@ -4304,7 +4304,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, SDVTList VTList,    // Memoize the node unless it returns a flag.    SDNode *N; -  if (VTList.VTs[VTList.NumVTs-1] != MVT::Flag) { +  if (VTList.VTs[VTList.NumVTs-1] != MVT::Glue) {      FoldingSetNodeID ID;      AddNodeIDNode(ID, Opcode, VTList, Ops, NumOps);      void *IP = 0; @@ -4713,7 +4713,7 @@ SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc,                                    unsigned NumOps) {    // If an identical node already exists, use it.    void *IP = 0; -  if (VTs.VTs[VTs.NumVTs-1] != MVT::Flag) { +  if (VTs.VTs[VTs.NumVTs-1] != MVT::Glue) {      FoldingSetNodeID ID;      AddNodeIDNode(ID, Opc, VTs, Ops, NumOps);      if (SDNode *ON = CSEMap.FindNodeOrInsertPos(ID, IP)) @@ -4913,7 +4913,7 @@ SelectionDAG::getMachineNode(unsigned Opcode, DebugLoc dl,  MachineSDNode *  SelectionDAG::getMachineNode(unsigned Opcode, DebugLoc DL, SDVTList VTs,                               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;    void *IP; @@ -4975,7 +4975,7 @@ SelectionDAG::getTargetInsertSubreg(int SRIdx, DebugLoc DL, EVT VT,  /// else return NULL.  SDNode *SelectionDAG::getNodeIfExists(unsigned Opcode, SDVTList VTList,                                        const SDValue *Ops, unsigned NumOps) { -  if (VTList.VTs[VTList.NumVTs-1] != MVT::Flag) { +  if (VTList.VTs[VTList.NumVTs-1] != MVT::Glue) {      FoldingSetNodeID ID;      AddNodeIDNode(ID, Opcode, VTList, Ops, NumOps);      void *IP = 0; diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 3d0ec36..8162422 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5922,7 +5922,7 @@ void SelectionDAGBuilder::visitInlineAsm(ImmutableCallSite CS) {    if (Flag.getNode()) AsmNodeOperands.push_back(Flag);    Chain = DAG.getNode(ISD::INLINEASM, getCurDebugLoc(), -                      DAG.getVTList(MVT::Other, MVT::Flag), +                      DAG.getVTList(MVT::Other, MVT::Glue),                        &AsmNodeOperands[0], AsmNodeOperands.size());    Flag = Chain.getValue(1); diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index b0122da..ccc03d5 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1287,7 +1287,7 @@ SelectInlineAsmMemoryOperands(std::vector<SDValue> &Ops) {    Ops.push_back(InOps[InlineAsm::Op_IsAlignStack]);  // 3    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.    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    // flagged set.    EVT VT = Root->getValueType(Root->getNumValues()-1); -  while (VT == MVT::Flag) { +  while (VT == MVT::Glue) {      SDNode *FU = findFlagUse(Root);      if (FU == NULL)        break; @@ -1460,7 +1460,7 @@ SDNode *SelectionDAGISel::Select_INLINEASM(SDNode *N) {    std::vector<EVT> VTs;    VTs.push_back(MVT::Other); -  VTs.push_back(MVT::Flag); +  VTs.push_back(MVT::Glue);    SDValue New = CurDAG->getNode(ISD::INLINEASM, N->getDebugLoc(),                                  VTs, &Ops[0], Ops.size());    New->setNodeId(-1); @@ -1521,7 +1521,7 @@ UpdateChainsAndFlags(SDNode *NodeToMatch, SDValue InputChain,          continue;        SDValue ChainVal = SDValue(ChainNode, ChainNode->getNumValues()-1); -      if (ChainVal.getValueType() == MVT::Flag) +      if (ChainVal.getValueType() == MVT::Glue)          ChainVal = ChainVal.getValue(ChainVal->getNumValues()-2);        assert(ChainVal.getValueType() == MVT::Other && "Not a chain?");        CurDAG->ReplaceAllUsesOfValueWith(ChainVal, InputChain, &ISU); @@ -1544,7 +1544,7 @@ UpdateChainsAndFlags(SDNode *NodeToMatch, SDValue InputChain,        if (FRN->getOpcode() == ISD::DELETED_NODE)          continue; -      assert(FRN->getValueType(FRN->getNumValues()-1) == MVT::Flag && +      assert(FRN->getValueType(FRN->getNumValues()-1) == MVT::Glue &&               "Doesn't have a flag result");        CurDAG->ReplaceAllUsesOfValueWith(SDValue(FRN, FRN->getNumValues()-1),                                          InputFlag, &ISU); @@ -1752,7 +1752,7 @@ MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTList,    int OldFlagResultNo = -1, OldChainResultNo = -1;    unsigned NTMNumResults = Node->getNumValues(); -  if (Node->getValueType(NTMNumResults-1) == MVT::Flag) { +  if (Node->getValueType(NTMNumResults-1) == MVT::Glue) {      OldFlagResultNo = NTMNumResults-1;      if (NTMNumResults != 1 &&          Node->getValueType(NTMNumResults-2) == MVT::Other) @@ -2193,7 +2193,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,      case OPC_CaptureFlagInput:        // If the current node has an input flag, capture it in InputFlag.        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);        continue; @@ -2503,7 +2503,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,        if (EmitNodeInfo & OPFL_Chain)          VTs.push_back(MVT::Other);        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        // results. @@ -2539,7 +2539,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,          for (unsigned i = FirstOpToCopy, e = NodeToMatch->getNumOperands();               i != e; ++i) {            SDValue V = NodeToMatch->getOperand(i); -          if (V.getValueType() == MVT::Flag) break; +          if (V.getValueType() == MVT::Glue) break;            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.          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),                                                               (SDNode*) 0));          } @@ -2639,7 +2639,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,          assert(i < NodeToMatch->getNumValues() &&                 NodeToMatch->getValueType(i) != MVT::Other && -               NodeToMatch->getValueType(i) != MVT::Flag && +               NodeToMatch->getValueType(i) != MVT::Glue &&                 "Invalid number of results to complete!");          assert((NodeToMatch->getValueType(i) == Res.getValueType() ||                  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        // list. -      if (NodeToMatch->getValueType(NodeToMatch->getNumValues()-1) == MVT::Flag) +      if (NodeToMatch->getValueType(NodeToMatch->getNumValues()-1) == MVT::Glue)          FlagResultNodesMatched.push_back(NodeToMatch);        // Update chain and flag uses. diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 8313de5..24df0f8 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -93,7 +93,7 @@ namespace llvm {      static std::string getEdgeAttributes(const void *Node, EdgeIter EI) {        SDValue Op = EI.getNode()->getOperand(EI.getOperand());        EVT VT = Op.getValueType(); -      if (VT == MVT::Flag) +      if (VT == MVT::Glue)          return "color=red,style=bold";        else if (VT == MVT::Other)          return "color=blue,style=dashed"; diff --git a/lib/Target/ARM/ARMISelDAGToDAG.cpp b/lib/Target/ARM/ARMISelDAGToDAG.cpp index e5a8d91..de8e411 100644 --- a/lib/Target/ARM/ARMISelDAGToDAG.cpp +++ b/lib/Target/ARM/ARMISelDAGToDAG.cpp @@ -2379,7 +2379,7 @@ SDNode *ARMDAGToDAGISel::Select(SDNode *N) {                                 MVT::i32);      SDValue Ops[] = { N1, Tmp2, N3, Chain, InFlag };      SDNode *ResNode = CurDAG->getMachineNode(Opc, dl, MVT::Other, -                                             MVT::Flag, Ops, 5); +                                             MVT::Glue, Ops, 5);      Chain = SDValue(ResNode, 0);      if (N->getNumValues() == 2) {        InFlag = SDValue(ResNode, 1); diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 39223c4..624afa3 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -874,7 +874,7 @@ Sched::Preference ARMTargetLowering::getSchedulingPreference(SDNode *N) const {    for (unsigned i = 0; i != NumVals; ++i) {      EVT VT = N->getValueType(i); -    if (VT == MVT::Flag || VT == MVT::Other) +    if (VT == MVT::Glue || VT == MVT::Other)        continue;      if (VT.isFloatingPoint() || VT.isVector())        return Sched::Latency; @@ -1423,7 +1423,7 @@ ARMTargetLowering::LowerCall(SDValue Chain, SDValue Callee,    if (InFlag.getNode())      Ops.push_back(InFlag); -  SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); +  SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);    if (isTailCall)      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;    }    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. @@ -2439,10 +2439,10 @@ ARMTargetLowering::getVFPCmp(SDValue LHS, SDValue RHS, SelectionDAG &DAG,                               DebugLoc dl) const {    SDValue Cmp;    if (!isFloatingPointZero(RHS)) -    Cmp = DAG.getNode(ARMISD::CMPFP, dl, MVT::Flag, LHS, RHS); +    Cmp = DAG.getNode(ARMISD::CMPFP, dl, MVT::Glue, LHS, RHS);    else -    Cmp = DAG.getNode(ARMISD::CMPFPw0, dl, MVT::Flag, LHS); -  return DAG.getNode(ARMISD::FMSTAT, dl, MVT::Flag, Cmp); +    Cmp = DAG.getNode(ARMISD::CMPFPw0, dl, MVT::Glue, LHS); +  return DAG.getNode(ARMISD::FMSTAT, dl, MVT::Glue, Cmp);  }  SDValue ARMTargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const { @@ -2633,7 +2633,7 @@ ARMTargetLowering::OptimizeVFPBrcond(SDValue Op, SelectionDAG &DAG) const {      expandf64Toi32(RHS, DAG, RHS1, RHS2);      ARMCC::CondCodes CondCode = IntCCToARMCC(CC);      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 };      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 Cmp = getVFPCmp(LHS, RHS, DAG, dl);    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 Res = DAG.getNode(ARMISD::BRCOND, dl, VTList, Ops, 5);    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    // captures the result into a carry 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.    Lo = DAG.getNode(ARMISD::RRX, dl, MVT::i32, Lo, Hi.getValue(1)); diff --git a/lib/Target/Alpha/AlphaISelDAGToDAG.cpp b/lib/Target/Alpha/AlphaISelDAGToDAG.cpp index 63bd8fe..7b91fea 100644 --- a/lib/Target/Alpha/AlphaISelDAGToDAG.cpp +++ b/lib/Target/Alpha/AlphaISelDAGToDAG.cpp @@ -240,7 +240,7 @@ SDNode *AlphaDAGToDAGISel::Select(SDNode *N) {      Chain = CurDAG->getCopyToReg(Chain, dl, Alpha::R27, N0,                                    Chain.getValue(1));      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 = CurDAG->getCopyFromReg(Chain, dl, Alpha::R27, MVT::i64,                                      SDValue(CNode, 1)); @@ -403,13 +403,13 @@ void AlphaDAGToDAGISel::SelectCALL(SDNode *N) {       Chain = CurDAG->getCopyToReg(Chain, dl, Alpha::R29, GOT, InFlag);       InFlag = Chain.getValue(1);       Chain = SDValue(CurDAG->getMachineNode(Alpha::BSR, dl, MVT::Other,  -                                            MVT::Flag, Addr.getOperand(0), +                                            MVT::Glue, Addr.getOperand(0),                                              Chain, InFlag), 0);     } else {       Chain = CurDAG->getCopyToReg(Chain, dl, Alpha::R27, Addr, InFlag);       InFlag = Chain.getValue(1);       Chain = SDValue(CurDAG->getMachineNode(Alpha::JSR, dl, MVT::Other, -                                            MVT::Flag, Chain, InFlag), 0); +                                            MVT::Glue, Chain, InFlag), 0);     }     InFlag = Chain.getValue(1); diff --git a/lib/Target/Alpha/AlphaISelLowering.cpp b/lib/Target/Alpha/AlphaISelLowering.cpp index e266eda..60e0858 100644 --- a/lib/Target/Alpha/AlphaISelLowering.cpp +++ b/lib/Target/Alpha/AlphaISelLowering.cpp @@ -306,7 +306,7 @@ AlphaTargetLowering::LowerCall(SDValue Chain, SDValue Callee,    }    // 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;    Ops.push_back(Chain);    Ops.push_back(Callee); diff --git a/lib/Target/Blackfin/BlackfinISelLowering.cpp b/lib/Target/Blackfin/BlackfinISelLowering.cpp index c07f1f2..dd27d0a 100644 --- a/lib/Target/Blackfin/BlackfinISelLowering.cpp +++ b/lib/Target/Blackfin/BlackfinISelLowering.cpp @@ -365,7 +365,7 @@ BlackfinTargetLowering::LowerCall(SDValue Chain, SDValue Callee,    std::vector<EVT> NodeTys;    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 };    Chain = DAG.getNode(BFISD::CALL, dl, NodeTys, Ops,                        InFlag.getNode() ? 3 : 2); @@ -432,7 +432,7 @@ SDValue BlackfinTargetLowering::LowerADDE(SDValue Op, SelectionDAG &DAG) const {                                 SDValue(CarryIn, 0));    // 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));    // Store intermediate carry from Sum @@ -440,11 +440,11 @@ SDValue BlackfinTargetLowering::LowerADDE(SDValue Op, SelectionDAG &DAG) const {                                        /* flag= */ SDValue(Sum, 1));    // 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));    // 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));    // Compose (i32, flag) pair diff --git a/lib/Target/CellSPU/SPUISelLowering.cpp b/lib/Target/CellSPU/SPUISelLowering.cpp index 8d047f1..614cf10 100644 --- a/lib/Target/CellSPU/SPUISelLowering.cpp +++ b/lib/Target/CellSPU/SPUISelLowering.cpp @@ -1423,7 +1423,7 @@ SPUTargetLowering::LowerCall(SDValue Chain, SDValue Callee,    if (InFlag.getNode())      Ops.push_back(InFlag);    // 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());    InFlag = Chain.getValue(1); diff --git a/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp b/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp index 2da8a59..6b43497 100644 --- a/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp +++ b/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp @@ -248,7 +248,7 @@ SDNode* MBlazeDAGToDAGISel::Select(SDNode *Node) {          // Emit Jump and Link Register          SDNode *ResNode = CurDAG->getMachineNode(MBlaze::BRLID, dl, MVT::Other, -                                                 MVT::Flag, R20Reg, Chain); +                                                 MVT::Glue, R20Reg, Chain);          Chain  = SDValue(ResNode, 0);          InFlag = SDValue(ResNode, 1);          ReplaceUses(SDValue(Node, 0), Chain); diff --git a/lib/Target/MBlaze/MBlazeISelLowering.cpp b/lib/Target/MBlaze/MBlazeISelLowering.cpp index dc7cff8..df5c416 100644 --- a/lib/Target/MBlaze/MBlazeISelLowering.cpp +++ b/lib/Target/MBlaze/MBlazeISelLowering.cpp @@ -621,7 +621,7 @@ LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv,    //             = Chain, Callee, Reg#1, Reg#2, ...    //    // 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;    Ops.push_back(Chain);    Ops.push_back(Callee); diff --git a/lib/Target/MSP430/MSP430ISelLowering.cpp b/lib/Target/MSP430/MSP430ISelLowering.cpp index 1b80c09..30ef4f5 100644 --- a/lib/Target/MSP430/MSP430ISelLowering.cpp +++ b/lib/Target/MSP430/MSP430ISelLowering.cpp @@ -536,7 +536,7 @@ MSP430TargetLowering::LowerCCCCallTo(SDValue Chain, SDValue Callee,      Callee = DAG.getTargetExternalSymbol(E->getSymbol(), MVT::i16);    // 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;    Ops.push_back(Chain);    Ops.push_back(Callee); @@ -747,7 +747,7 @@ static SDValue EmitCMP(SDValue &LHS, SDValue &RHS, SDValue &TargetCC,    }    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;    } else {      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;      Ops.push_back(One);      Ops.push_back(Zero); @@ -858,7 +858,7 @@ SDValue MSP430TargetLowering::LowerSELECT_CC(SDValue Op,    SDValue TargetCC;    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;    Ops.push_back(TrueV);    Ops.push_back(FalseV); diff --git a/lib/Target/Mips/MipsISelDAGToDAG.cpp b/lib/Target/Mips/MipsISelDAGToDAG.cpp index ff9f12e..dba819c 100644 --- a/lib/Target/Mips/MipsISelDAGToDAG.cpp +++ b/lib/Target/Mips/MipsISelDAGToDAG.cpp @@ -349,7 +349,7 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {        SDNode *AddCarry = CurDAG->getMachineNode(Mips::ADDu, dl, VT,                                                   SDValue(Carry,0), RHS); -      return CurDAG->SelectNodeTo(Node, MOp, VT, MVT::Flag, +      return CurDAG->SelectNodeTo(Node, MOp, VT, MVT::Glue,                                    LHS, SDValue(AddCarry,0));      } @@ -367,11 +367,11 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {        else          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);        SDNode *Lo = CurDAG->getMachineNode(Mips::MFLO, dl, MVT::i32,  -                                          MVT::Flag, InFlag); +                                          MVT::Glue, InFlag);        InFlag = SDValue(Lo,1);        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);        SDNode *MulNode = CurDAG->getMachineNode(MulOp, dl,  -                                               MVT::Flag, MulOp1, MulOp2); +                                               MVT::Glue, MulOp1, MulOp2);        SDValue InFlag = SDValue(MulNode, 0); @@ -421,7 +421,7 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {          Op  = (Opcode == ISD::SREM ? Mips::DIV : Mips::DIVu);          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);        return CurDAG->getMachineNode(MOp, dl, MVT::i32, InFlag); @@ -474,7 +474,7 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {          SDValue InFlag;          // Skip the incomming flag if present -        if (Node->getOperand(LastOpNum).getValueType() == MVT::Flag) +        if (Node->getOperand(LastOpNum).getValueType() == MVT::Glue)            LastOpNum--;          if ( (isa<GlobalAddressSDNode>(Callee)) || @@ -496,7 +496,7 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {            Chain = CurDAG->getCopyToReg(Chain, dl, Mips::T9, Callee, InFlag);          // 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;          Ops.push_back(CurDAG->getRegister(Mips::T9, MVT::i32)); diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp index 8ba7b63..f4effae 100644 --- a/lib/Target/Mips/MipsISelLowering.cpp +++ b/lib/Target/Mips/MipsISelLowering.cpp @@ -905,7 +905,7 @@ MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee,    //             = Chain, Callee, Reg#1, Reg#2, ...    //    // 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;    Ops.push_back(Chain);    Ops.push_back(Callee); diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 2e189a7..b7f0ef3 100644 --- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -635,7 +635,7 @@ SDNode *PPCDAGToDAGISel::SelectSETCC(SDNode *N) {        }        case ISD::SETNE: {          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);          return CurDAG->SelectNodeTo(N, PPC::SUBFE, MVT::i32, AD, Op,                                       AD.getValue(1)); @@ -657,7 +657,7 @@ SDNode *PPCDAGToDAGISel::SelectSETCC(SDNode *N) {        switch (CC) {        default: break;        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);          return CurDAG->SelectNodeTo(N, PPC::ADDZE, MVT::i32,                                 SDValue(CurDAG->getMachineNode(PPC::LI, dl,  @@ -666,7 +666,7 @@ SDNode *PPCDAGToDAGISel::SelectSETCC(SDNode *N) {                                        Op.getValue(1));        case ISD::SETNE: {          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));          return CurDAG->SelectNodeTo(N, PPC::SUBFE, MVT::i32, SDValue(AD, 0),                                      Op, SDValue(AD, 1)); @@ -858,13 +858,13 @@ SDNode *PPCDAGToDAGISel::Select(SDNode *N) {        SDValue N0 = N->getOperand(0);        if ((signed)Imm > 0 && isPowerOf2_32(Imm)) {          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)));          return CurDAG->SelectNodeTo(N, PPC::ADDZE, MVT::i32,                                       SDValue(Op, 0), SDValue(Op, 1));        } else if ((signed)Imm < 0 && isPowerOf2_32(-Imm)) {          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)));          SDValue PT =            SDValue(CurDAG->getMachineNode(PPC::ADDZE, dl, MVT::i32, @@ -1016,7 +1016,7 @@ SDNode *PPCDAGToDAGISel::Select(SDNode *N) {                // FIXME: Implement this optzn for PPC64.                N->getValueType(0) == MVT::i32) {              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));              return CurDAG->SelectNodeTo(N, PPC::SUBFE, MVT::i32,                                          SDValue(Tmp, 0), N->getOperand(0), diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp index d57b183..783ac12 100644 --- a/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/lib/Target/PowerPC/PPCISelLowering.cpp @@ -2427,7 +2427,7 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,    EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();    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; @@ -2514,7 +2514,7 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,        // Load the address of the function entry point from the function        // 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,                                          InFlag.getNode() ? 3 : 2);        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        // additional register being allocated and an unnecessary move instruction        // 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,                                         Callee, InFlag);        Chain = LoadTOCPtr.getValue(0); @@ -2558,7 +2558,7 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,      NodeTys.clear();      NodeTys.push_back(MVT::Other); -    NodeTys.push_back(MVT::Flag); +    NodeTys.push_back(MVT::Glue);      Ops.push_back(Chain);      CallOpc = isSVR4ABI ? PPCISD::BCTRL_SVR4 : PPCISD::BCTRL_Darwin;      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    // same TOC), the NOP will remain unchanged.    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) {        // This is a call through a function pointer.        // 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);      } else {        // 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    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);    // Save FP register to stack slot @@ -4254,7 +4254,7 @@ SDValue PPCTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,    };    std::vector<EVT> VTs;    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);    // 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;      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);      MFFSreg = Result.getValue(0);      InFlag = Result.getValue(1);      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[1] = InFlag;      Result = DAG.getNode(PPCISD::MTFSB1, dl, NodeTys, Ops, 2);      InFlag = Result.getValue(0);      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[1] = InFlag;      Result = DAG.getNode(PPCISD::MTFSB0, dl, NodeTys, Ops, 2); @@ -4467,7 +4467,7 @@ void PPCTargetLowering::ReplaceNodeResults(SDNode *N,      NodeTys.clear();      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[1] = Hi;      Ops[2] = InFlag; @@ -5273,7 +5273,7 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,          DAG.getConstant(CompareOpc, MVT::i32)        };        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);        // Unpack the result based on how the target uses it. diff --git a/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/lib/Target/Sparc/SparcISelDAGToDAG.cpp index 3f178d3..8c6103d 100644 --- a/lib/Target/Sparc/SparcISelDAGToDAG.cpp +++ b/lib/Target/Sparc/SparcISelDAGToDAG.cpp @@ -158,7 +158,7 @@ SDNode *SparcDAGToDAGISel::Select(SDNode *N) {      } else {        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);      // FIXME: Handle div by immediate. @@ -172,7 +172,7 @@ SDNode *SparcDAGToDAGISel::Select(SDNode *N) {      SDValue MulLHS = N->getOperand(0);      SDValue MulRHS = N->getOperand(1);      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);      // The high part is in the Y register.      return CurDAG->SelectNodeTo(N, SP::RDY, MVT::i32, SDValue(Mul, 1)); diff --git a/lib/Target/Sparc/SparcISelLowering.cpp b/lib/Target/Sparc/SparcISelLowering.cpp index 7381222..468f02d 100644 --- a/lib/Target/Sparc/SparcISelLowering.cpp +++ b/lib/Target/Sparc/SparcISelLowering.cpp @@ -488,7 +488,7 @@ SparcTargetLowering::LowerCall(SDValue Chain, SDValue Callee,    std::vector<EVT> NodeTys;    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 };    Chain = DAG.getNode(SPISD::CALL, dl, NodeTys, Ops, InFlag.getNode() ? 3 : 2);    InFlag = Chain.getValue(1); @@ -834,13 +834,13 @@ static SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG) {    if (LHS.getValueType() == MVT::i32) {      std::vector<EVT> VTs;      VTs.push_back(MVT::i32); -    VTs.push_back(MVT::Flag); +    VTs.push_back(MVT::Glue);      SDValue Ops[2] = { LHS, RHS };      CompareFlag = DAG.getNode(SPISD::CMPICC, dl, VTs, Ops, 2).getValue(1);      if (SPCC == ~0U) SPCC = IntCondCCodeToICC(CC);      Opc = SPISD::BRICC;    } 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);      Opc = SPISD::BRFCC;    } @@ -865,13 +865,13 @@ static SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) {    if (LHS.getValueType() == MVT::i32) {      std::vector<EVT> VTs;      VTs.push_back(LHS.getValueType());   // subcc returns a value -    VTs.push_back(MVT::Flag); +    VTs.push_back(MVT::Glue);      SDValue Ops[2] = { LHS, RHS };      CompareFlag = DAG.getNode(SPISD::CMPICC, dl, VTs, Ops, 2).getValue(1);      Opc = SPISD::SELECT_ICC;      if (SPCC == ~0U) SPCC = IntCondCCodeToICC(CC);    } 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;      if (SPCC == ~0U) SPCC = FPCondCCodeToFCC(CC);    } diff --git a/lib/Target/SystemZ/SystemZISelLowering.cpp b/lib/Target/SystemZ/SystemZISelLowering.cpp index 6b55d98..61cf95d 100644 --- a/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/lib/Target/SystemZ/SystemZISelLowering.cpp @@ -471,7 +471,7 @@ SystemZTargetLowering::LowerCCCCallTo(SDValue Chain, SDValue Callee,      Callee = DAG.getTargetExternalSymbol(E->getSymbol(), getPointerTy());    // 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;    Ops.push_back(Chain);    Ops.push_back(Callee); @@ -710,7 +710,7 @@ SDValue SystemZTargetLowering::LowerSELECT_CC(SDValue Op,    SDValue SystemZCC;    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;    Ops.push_back(TrueV);    Ops.push_back(FalseV); diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 1311dba..7fe4e82 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -1675,14 +1675,14 @@ SDNode *X86DAGToDAGISel::Select(SDNode *Node) {        SDValue Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Tmp4, N1.getOperand(0),                          InFlag };        SDNode *CNode = -        CurDAG->getMachineNode(MOpc, dl, MVT::Other, MVT::Flag, Ops, +        CurDAG->getMachineNode(MOpc, dl, MVT::Other, MVT::Glue, Ops,                                 array_lengthof(Ops));        InFlag = SDValue(CNode, 1);        // Update the chain.        ReplaceUses(N1.getValue(1), SDValue(CNode, 0));      } 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);      } @@ -1807,7 +1807,7 @@ SDNode *X86DAGToDAGISel::Select(SDNode *Node) {        if (isSigned && !signBitIsZero) {          // Sign extend the low part into the high part.          InFlag = -          SDValue(CurDAG->getMachineNode(SExtOpcode, dl, MVT::Flag, InFlag),0); +          SDValue(CurDAG->getMachineNode(SExtOpcode, dl, MVT::Glue, InFlag),0);        } else {          // Zero out the high part, effectively zero extending the input.          SDValue ClrNode = @@ -1821,14 +1821,14 @@ SDNode *X86DAGToDAGISel::Select(SDNode *Node) {        SDValue Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Tmp4, N1.getOperand(0),                          InFlag };        SDNode *CNode = -        CurDAG->getMachineNode(MOpc, dl, MVT::Other, MVT::Flag, Ops, +        CurDAG->getMachineNode(MOpc, dl, MVT::Other, MVT::Glue, Ops,                                 array_lengthof(Ops));        InFlag = SDValue(CNode, 1);        // Update the chain.        ReplaceUses(N1.getValue(1), SDValue(CNode, 0));      } else {        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. diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index e4561aa..ba357ed 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -256,7 +256,7 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)      setOperationAction(ISD::SREM, 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::ADDE, 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::f80) Opc = isST0 ? X86::FpGET_ST0_80:X86::FpGET_ST1_80;        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);        Val = Chain.getValue(0); @@ -2177,7 +2177,7 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee,    }    // 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;    if (!IsSibcall && isTailCall) { @@ -6034,7 +6034,7 @@ GetTLSADDR(SelectionDAG &DAG, SDValue Chain, GlobalAddressSDNode *GA,             SDValue *InFlag, const EVT PtrVT, unsigned ReturnReg,             unsigned char OperandFlags) {    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();    SDValue TGA = DAG.getTargetGlobalAddress(GA->getGlobal(), dl,                                             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      // location.      SDValue Chain = DAG.getEntryNode(); -    SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag); +    SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);      SDValue Args[] = { Chain, Offset };      Chain = DAG.getNode(X86ISD::TLSCALL, DL, NodeTys, Args, 2); @@ -6290,7 +6290,7 @@ SDValue X86TargetLowering::BuildFILD(SDValue Op, EVT SrcVT, SDValue Chain,    SDVTList Tys;    bool useSSE = isScalarFPTypeInSSEReg(Op.getValueType());    if (useSSE) -    Tys = DAG.getVTList(MVT::f64, MVT::Other, MVT::Flag); +    Tys = DAG.getVTList(MVT::f64, MVT::Other, MVT::Glue);    else      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    // 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 };    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);    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);    Flag = Chain.getValue(1); @@ -8569,7 +8569,7 @@ SDValue X86TargetLowering::LowerCMP_SWAP(SDValue Op, SelectionDAG &DAG) const {                      Op.getOperand(3),                      DAG.getTargetConstant(size, MVT::i8),                      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();    SDValue Result = DAG.getMemIntrinsicNode(X86ISD::LCMPXCHG_DAG, DL, Tys,                                             Ops, 5, T, MMO); @@ -8581,7 +8581,7 @@ SDValue X86TargetLowering::LowerCMP_SWAP(SDValue Op, SelectionDAG &DAG) const {  SDValue X86TargetLowering::LowerREADCYCLECOUNTER(SDValue Op,                                                   SelectionDAG &DAG) const {    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);    DebugLoc dl = Op.getDebugLoc();    SDValue rd = DAG.getNode(X86ISD::RDTSC_DAG, dl, Tys, &TheChain, 1); @@ -8775,7 +8775,7 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N,      return;    }    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 rd = DAG.getNode(X86ISD::RDTSC_DAG, dl, Tys, &TheChain, 1);      SDValue eax = DAG.getCopyFromReg(rd, dl, X86::EAX, MVT::i32, @@ -8811,7 +8811,7 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N,      SDValue Ops[] = { swapInH.getValue(0),                        N->getOperand(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();      SDValue Result = DAG.getMemIntrinsicNode(X86ISD::LCMPXCHG8_DAG, dl, Tys,                                               Ops, 3, T, MMO); diff --git a/lib/Target/X86/X86SelectionDAGInfo.cpp b/lib/Target/X86/X86SelectionDAGInfo.cpp index 0c5a0ac..42e8193 100644 --- a/lib/Target/X86/X86SelectionDAGInfo.cpp +++ b/lib/Target/X86/X86SelectionDAGInfo.cpp @@ -136,7 +136,7 @@ X86SelectionDAGInfo::EmitTargetCodeForMemset(SelectionDAG &DAG, DebugLoc dl,                              Dst, InFlag);    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 };    Chain = DAG.getNode(X86ISD::REP_STOS, dl, Tys, Ops, array_lengthof(Ops)); @@ -150,7 +150,7 @@ X86SelectionDAGInfo::EmitTargetCodeForMemset(SelectionDAG &DAG, DebugLoc dl,                                                               X86::ECX,                                Left, InFlag);      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 };      Chain = DAG.getNode(X86ISD::REP_STOS, dl, Tys, Ops, array_lengthof(Ops));    } else if (BytesLeft) { @@ -230,7 +230,7 @@ X86SelectionDAGInfo::EmitTargetCodeForMemcpy(SelectionDAG &DAG, DebugLoc dl,                              Src, InFlag);    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 RepMovs = DAG.getNode(X86ISD::REP_MOVS, dl, Tys, Ops,                                  array_lengthof(Ops)); diff --git a/lib/Target/XCore/XCoreISelLowering.cpp b/lib/Target/XCore/XCoreISelLowering.cpp index 9325e1f..11840a1 100644 --- a/lib/Target/XCore/XCoreISelLowering.cpp +++ b/lib/Target/XCore/XCoreISelLowering.cpp @@ -926,7 +926,7 @@ XCoreTargetLowering::LowerCCCCallTo(SDValue Chain, SDValue Callee,    //             = Chain, Callee, Reg#1, Reg#2, ...      //    // 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;    Ops.push_back(Chain);    Ops.push_back(Callee); diff --git a/lib/VMCore/ValueTypes.cpp b/lib/VMCore/ValueTypes.cpp index b59e202..c054ae4 100644 --- a/lib/VMCore/ValueTypes.cpp +++ b/lib/VMCore/ValueTypes.cpp @@ -109,7 +109,7 @@ std::string EVT::getEVTString() const {    case MVT::ppcf128: return "ppcf128";    case MVT::isVoid:  return "isVoid";    case MVT::Other:   return "ch"; -  case MVT::Flag:    return "flag"; +  case MVT::Glue:    return "glue";    case MVT::x86mmx:  return "x86mmx";    case MVT::v2i8:    return "v2i8";    case MVT::v4i8:    return "v4i8";  | 
