[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Evan Cheng
evan.cheng at apple.com
Thu Jan 5 16:41:55 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.253 -> 1.254
---
Log message:
Support for custom lowering of ISD::RET.
---
Diffs of the changes: (+16 -0)
LegalizeDAG.cpp | 16 ++++++++++++++++
1 files changed, 16 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.253 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.254
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.253 Wed Jan 4 19:25:28 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Jan 5 18:41:43 2006
@@ -1302,6 +1302,22 @@
break;
}
}
+
+ MVT::ValueType VT = Node->getValueType(0);
+ switch (TLI.getOperationAction(Node->getOpcode(), VT)) {
+ default: assert(0 && "This action is not supported yet!");
+ case TargetLowering::Custom: {
+ SDOperand Tmp = TLI.LowerOperation(Result, DAG);
+ if (Tmp.Val) {
+ Result = LegalizeOp(Tmp);
+ break;
+ }
+ // FALLTHROUGH if the target thinks it is legal.
+ }
+ case TargetLowering::Legal:
+ // Nothing to do.
+ break;
+ }
break;
case ISD::STORE: {
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
More information about the llvm-commits
mailing list