summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-16 06:45:34 +0000
committerChris Lattner <sabre@nondot.org>2006-05-16 06:45:34 +0000
commit8c0c10c2b9fef21dcbabac81fffa32f4407a0b7f (patch)
treeab8eb72058bb5c1f7574b1016c0ef070f000e248 /lib/CodeGen/SelectionDAG
parentc1a8ad71e11123f1e3c8d9913a7f51978b9967d5 (diff)
downloadllvm-8c0c10c2b9fef21dcbabac81fffa32f4407a0b7f.tar.gz
llvm-8c0c10c2b9fef21dcbabac81fffa32f4407a0b7f.tar.bz2
llvm-8c0c10c2b9fef21dcbabac81fffa32f4407a0b7f.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28320 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 1cac134187..b647232370 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -2349,6 +2349,7 @@ std::vector<SDOperand>
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 @@ TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
}
}
- 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();