diff options
author | Duncan Sands <baldrick@free.fr> | 2009-01-21 09:00:29 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-01-21 09:00:29 +0000 |
commit | 9fbc7e2e7a765298fb4326885b407e0962f7ab62 (patch) | |
tree | d57e9c6df9132b004dacd529f2e4549f955d2cf1 /lib/CodeGen/SelectionDAG/LegalizeTypes.cpp | |
parent | d3be46214ca75f0ba7d5fc6cd322d222dd53e2cb (diff) |
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.cpp | 14 |
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. |