summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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
commit3d82699605dc8983fa14762bdf6207e4f6678700 (patch)
tree41a74cf651510a20829a5f3ea27255dc81ec578f /llvm/lib/CodeGen
parent0f89bbd6ccb7c1a788b34a0cfa5d5ba1b65aefcf (diff)
downloadbcm5719-llvm-3d82699605dc8983fa14762bdf6207e4f6678700.tar.gz
bcm5719-llvm-3d82699605dc8983fa14762bdf6207e4f6678700.zip
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. llvm-svn: 28320
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 1cac1341872..b6472323708 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud