summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-01-21 09:00:29 +0000
committerDuncan Sands <baldrick@free.fr>2009-01-21 09:00:29 +0000
commit9fbc7e2e7a765298fb4326885b407e0962f7ab62 (patch)
treed57e9c6df9132b004dacd529f2e4549f955d2cf1 /lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
parentd3be46214ca75f0ba7d5fc6cd322d222dd53e2cb (diff)
downloadllvm-9fbc7e2e7a765298fb4326885b407e0962f7ab62.tar.gz
llvm-9fbc7e2e7a765298fb4326885b407e0962f7ab62.tar.bz2
llvm-9fbc7e2e7a765298fb4326885b407e0962f7ab62.tar.xz
Cleanup whitespace and comments, and tweak some
prototypes, in operand type legalization. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeTypes.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeTypes.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
index ff7b8a9563..a4f3917b18 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
@@ -848,27 +848,23 @@ SDValue DAGTypeLegalizer::CreateStackStoreLoad(SDValue Op,
/// CustomLowerResults - Replace the node's results with custom code provided
/// by the target and return "true", or do nothing and return "false".
-/// The last parameter is FALSE if we are dealing with a node with legal
+/// The last parameter is FALSE if we are dealing with a node with legal
/// result types and illegal operand. The second parameter denotes the illegal
/// OperandNo in that case.
/// The last parameter being TRUE means we are dealing with a
-/// node with illegal result types. The second parameter denotes the illegal
+/// node with illegal result types. The second parameter denotes the illegal
/// ResNo in that case.
-bool DAGTypeLegalizer::CustomLowerResults(SDNode *N, unsigned Num,
+bool DAGTypeLegalizer::CustomLowerResults(SDNode *N, MVT VT,
bool LegalizeResult) {
- // Get the type of illegal Result or Operand.
- MVT ValueTy = (LegalizeResult) ? N->getValueType(Num)
- : N->getOperand(Num).getValueType();
-
// See if the target wants to custom lower this node.
- if (TLI.getOperationAction(N->getOpcode(), ValueTy) != TargetLowering::Custom)
+ if (TLI.getOperationAction(N->getOpcode(), VT) != TargetLowering::Custom)
return false;
SmallVector<SDValue, 8> Results;
if (LegalizeResult)
TLI.ReplaceNodeResults(N, Results, DAG);
else
- TLI.LowerOperationWrapper(SDValue(N, 0), Results, DAG);
+ TLI.LowerOperationWrapper(N, Results, DAG);
if (Results.empty())
// The target didn't want to custom lower it after all.