[llvm-commits] [llvm] r41578 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Anton Korobeynikov
asl at math.spbu.ru
Wed Aug 29 12:28:30 PDT 2007
Author: asl
Date: Wed Aug 29 14:28:29 2007
New Revision: 41578
URL: http://llvm.org/viewvc/llvm-project?rev=41578&view=rev
Log:
Lower FRAME_TO_ADDR_OFFSET to zero by default (if not custom lowered)
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=41578&r1=41577&r2=41578&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Aug 29 14:28:29 2007
@@ -733,7 +733,6 @@
break;
case ISD::FRAMEADDR:
case ISD::RETURNADDR:
- case ISD::FRAME_TO_ARGS_OFFSET:
// The only option for these nodes is to custom lower them. If the target
// does not custom lower them, then return zero.
Tmp1 = TLI.LowerOperation(Op, DAG);
@@ -742,6 +741,19 @@
else
Result = DAG.getConstant(0, TLI.getPointerTy());
break;
+ case ISD::FRAME_TO_ARGS_OFFSET:
+ MVT::ValueType VT = Node->getValueType(0);
+ switch (TLI.getOperationAction(Node->getOpcode(), VT)) {
+ default: assert(0 && "This action is not supported yet!");
+ case TargetLowering::Custom:
+ Result = TLI.LowerOperation(Op, DAG);
+ if (Result.Val) break;
+ // Fall Thru
+ case TargetLowering::Legal:
+ Result = DAG.getConstant(0, VT);
+ break;
+ }
+ break;
case ISD::EXCEPTIONADDR: {
Tmp1 = LegalizeOp(Node->getOperand(0));
MVT::ValueType VT = Node->getValueType(0);
More information about the llvm-commits
mailing list