summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-06-30 10:19:09 +0000
committerDuncan Sands <baldrick@free.fr>2008-06-30 10:19:09 +0000
commit1ae6ef83ee4a1625a1a037ff16442c56fdd81936 (patch)
tree0eb154b60b2abec1d01be6d747500b86bd3e205b /llvm/lib/Target/ARM/ARMISelLowering.cpp
parent5447e4331b9cb3277eb37ff91655a0526e79d334 (diff)
downloadbcm5719-llvm-1ae6ef83ee4a1625a1a037ff16442c56fdd81936.tar.gz
bcm5719-llvm-1ae6ef83ee4a1625a1a037ff16442c56fdd81936.zip
Revert the SelectionDAG optimization that makes
it impossible to create a MERGE_VALUES node with only one result: sometimes it is useful to be able to create a node with only one result out of one of the results of a node with more than one result, for example because the new node will eventually be used to replace a one-result node using ReplaceAllUsesWith, cf X86TargetLowering::ExpandFP_TO_SINT. On the other hand, most users of MERGE_VALUES don't need this and for them the optimization was valuable. So add a new utility method getMergeValues for creating MERGE_VALUES nodes which by default performs the optimization. Change almost everywhere to use getMergeValues (and tidy some stuff up at the same time). llvm-svn: 52893
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index cfb98cb21cc..2c11919b482 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -654,8 +654,8 @@ SDOperand ARMTargetLowering::LowerCALL(SDOperand Op, SelectionDAG &DAG) {
return Chain;
ResultVals.push_back(Chain);
- SDOperand Res = DAG.getNode(ISD::MERGE_VALUES, NodeTys, &ResultVals[0],
- ResultVals.size());
+ SDOperand Res = DAG.getMergeValues(DAG.getVTList(&NodeTys[0], NodeTys.size()),
+ &ResultVals[0], ResultVals.size());
return Res.getValue(Op.ResNo);
}
@@ -1025,9 +1025,8 @@ ARMTargetLowering::LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG) {
ArgValues.push_back(Root);
// Return the new list of results.
- std::vector<MVT> RetVT(Op.Val->value_begin(),
- Op.Val->value_end());
- return DAG.getNode(ISD::MERGE_VALUES, RetVT, &ArgValues[0], ArgValues.size());
+ return DAG.getMergeValues(Op.Val->getVTList(), &ArgValues[0],
+ ArgValues.size());
}
/// isFloatingPointZero - Return true if this is +0.0.
OpenPOWER on IntegriCloud