[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAG.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu May 12 16:24:21 PDT 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.116 -> 1.117
SelectionDAG.cpp updated: 1.108 -> 1.109
---
Log message:

rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.



---
Diffs of the changes:  (+22 -22)

 LegalizeDAG.cpp  |   32 ++++++++++++++++----------------
 SelectionDAG.cpp |   12 ++++++------
 2 files changed, 22 insertions(+), 22 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.116 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.117
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.116	Thu May 12 14:56:57 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp	Thu May 12 18:24:06 2005
@@ -323,8 +323,8 @@
     break;
   }
 
-  case ISD::ADJCALLSTACKDOWN:
-  case ISD::ADJCALLSTACKUP:
+  case ISD::CALLSEQ_START:
+  case ISD::CALLSEQ_END:
     Tmp1 = LegalizeOp(Node->getOperand(0));  // Legalize the chain.
     // There is no need to legalize the size argument (Operand #1)
     Tmp2 = Node->getOperand(0);
@@ -339,7 +339,7 @@
         DAG.getNode(ISD::PCMARKER, MVT::Other, Tmp2,
                     DAG.getConstant(0, MVT::i32));
     }
-    // Note that we do not create new ADJCALLSTACK DOWN/UP nodes here.  These
+    // Note that we do not create new CALLSEQ_DOWN/UP nodes here.  These
     // nodes are treated specially and are mutated in place.  This makes the dag
     // legalization process more efficient and also makes libcall insertion
     // easier.
@@ -1945,9 +1945,9 @@
 static void FindLatestAdjCallStackDown(SDNode *Node, SDNode *&Found) {
   if (Node->getNodeDepth() <= Found->getNodeDepth()) return;
 
-  // If we found an ADJCALLSTACKDOWN, we already know this node occurs later
+  // If we found an CALLSEQ_START, we already know this node occurs later
   // than the Found node. Just remember this node and return.
-  if (Node->getOpcode() == ISD::ADJCALLSTACKDOWN) {
+  if (Node->getOpcode() == ISD::CALLSEQ_START) {
     Found = Node;
     return;
   }
@@ -1970,9 +1970,9 @@
 static void FindEarliestAdjCallStackUp(SDNode *Node, SDNode *&Found) {
   if (Found && Node->getNodeDepth() >= Found->getNodeDepth()) return;
 
-  // If we found an ADJCALLSTACKUP, we already know this node occurs earlier
+  // If we found an CALLSEQ_END, we already know this node occurs earlier
   // than the Found node. Just remember this node and return.
-  if (Node->getOpcode() == ISD::ADJCALLSTACKUP) {
+  if (Node->getOpcode() == ISD::CALLSEQ_END) {
     Found = Node;
     return;
   }
@@ -1988,9 +1988,9 @@
 }
 
 /// FindAdjCallStackUp - Given a chained node that is part of a call sequence,
-/// find the ADJCALLSTACKUP node that terminates the call sequence.
+/// find the CALLSEQ_END node that terminates the call sequence.
 static SDNode *FindAdjCallStackUp(SDNode *Node) {
-  if (Node->getOpcode() == ISD::ADJCALLSTACKUP)
+  if (Node->getOpcode() == ISD::CALLSEQ_END)
     return Node;
   if (Node->use_empty())
     return 0;   // No adjcallstackup
@@ -2003,7 +2003,7 @@
 
   for (SDNode::use_iterator UI = Node->use_begin(),
          E = Node->use_end(); ; ++UI) {
-    assert(UI != E && "Didn't find a user of the tokchain, no ADJCALLSTACKUP!");
+    assert(UI != E && "Didn't find a user of the tokchain, no CALLSEQ_END!");
 
     // Make sure to only follow users of our token chain.
     SDNode *User = *UI;
@@ -2016,10 +2016,10 @@
 }
 
 /// FindAdjCallStackDown - Given a chained node that is part of a call sequence,
-/// find the ADJCALLSTACKDOWN node that initiates the call sequence.
+/// find the CALLSEQ_START node that initiates the call sequence.
 static SDNode *FindAdjCallStackDown(SDNode *Node) {
   assert(Node && "Didn't find adjcallstackdown for a call??");
-  if (Node->getOpcode() == ISD::ADJCALLSTACKDOWN) return Node;
+  if (Node->getOpcode() == ISD::CALLSEQ_START) return Node;
 
   assert(Node->getOperand(0).getValueType() == MVT::Other &&
          "Node doesn't have a token chain argument!");
@@ -2040,11 +2040,11 @@
   FindLatestAdjCallStackDown(OpNode, LatestAdjCallStackDown);
   //std::cerr<<"Found node: "; LatestAdjCallStackDown->dump(); std::cerr <<"\n";
 
-  // It is possible that no ISD::ADJCALLSTACKDOWN was found because there is no
+  // It is possible that no ISD::CALLSEQ_START was found because there is no
   // previous call in the function.  LatestCallStackDown may in that case be
-  // the entry node itself.  Do not attempt to find a matching ADJCALLSTACKUP
-  // unless LatestCallStackDown is an ADJCALLSTACKDOWN.
-  if (LatestAdjCallStackDown->getOpcode() == ISD::ADJCALLSTACKDOWN)
+  // the entry node itself.  Do not attempt to find a matching CALLSEQ_END
+  // unless LatestCallStackDown is an CALLSEQ_START.
+  if (LatestAdjCallStackDown->getOpcode() == ISD::CALLSEQ_START)
     LatestAdjCallStackUp = FindAdjCallStackUp(LatestAdjCallStackDown);
   else
     LatestAdjCallStackUp = Entry.Val;


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.108 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.109
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.108	Thu May 12 01:27:02 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Thu May 12 18:24:06 2005
@@ -1194,7 +1194,7 @@
 
   // Memoize this node if possible.
   SDNode *N;
-  if (Opcode != ISD::ADJCALLSTACKDOWN && Opcode != ISD::ADJCALLSTACKUP) {
+  if (Opcode != ISD::CALLSEQ_START && Opcode != ISD::CALLSEQ_END) {
     SDNode *&BON = BinaryOps[std::make_pair(Opcode, std::make_pair(N1, N2))];
     if (BON) return SDOperand(BON, 0);
 
@@ -1214,11 +1214,11 @@
 }
 
 // setAdjCallChain - This method changes the token chain of an
-// ADJCALLSTACKDOWN/UP node to be the specified operand.
+// CALLSEQ_START/END node to be the specified operand.
 void SDNode::setAdjCallChain(SDOperand N) {
   assert(N.getValueType() == MVT::Other);
-  assert((getOpcode() == ISD::ADJCALLSTACKDOWN ||
-          getOpcode() == ISD::ADJCALLSTACKUP) && "Cannot adjust this node!");
+  assert((getOpcode() == ISD::CALLSEQ_START ||
+          getOpcode() == ISD::CALLSEQ_END) && "Cannot adjust this node!");
 
   Operands[0].Val->removeUser(this);
   Operands[0] = N;
@@ -1690,8 +1690,8 @@
   case ISD::BRCONDTWOWAY:  return "brcondtwoway";
   case ISD::RET:     return "ret";
   case ISD::CALL:    return "call";
-  case ISD::ADJCALLSTACKDOWN:  return "adjcallstackdown";
-  case ISD::ADJCALLSTACKUP:    return "adjcallstackup";
+  case ISD::CALLSEQ_START:  return "callseq_end";
+  case ISD::CALLSEQ_END:    return "callseq_start";
 
     // Other operators
   case ISD::LOAD:    return "load";






More information about the llvm-commits mailing list