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

Chris Lattner lattner at cs.uiuc.edu
Mon May 15 23:45:48 PDT 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.241 -> 1.242
---
Log message:

Add a chain to FORMAL_ARGUMENTS.  This is a minimal port of the X86 backend,
it doesn't currently use/maintain the chain properly.  Also, make the 
X86ISelLowering.cpp file 80-col clean.


---
Diffs of the changes:  (+4 -2)

 SelectionDAGISel.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.241 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.242
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.241	Tue May 16 01:10:58 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Tue May 16 01:45:34 2006
@@ -2349,6 +2349,7 @@
 TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
   // Add CC# and isVararg as operands to the FORMAL_ARGUMENTS node.
   std::vector<SDOperand> Ops;
+  Ops.push_back(DAG.getRoot());
   Ops.push_back(DAG.getConstant(F.getCallingConv(), getPointerTy()));
   Ops.push_back(DAG.getConstant(F.isVarArg(), getPointerTy()));
 
@@ -2393,11 +2394,12 @@
     }
   }
 
-  if (RetVals.size() == 0)
-    RetVals.push_back(MVT::isVoid);
+  RetVals.push_back(MVT::Other);
   
   // Create the node.
   SDNode *Result = DAG.getNode(ISD::FORMAL_ARGUMENTS, RetVals, Ops).Val;
+  
+  DAG.setRoot(SDOperand(Result, Result->getNumValues()-1));
 
   // Set up the return result vector.
   Ops.clear();






More information about the llvm-commits mailing list