[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelLowering.cpp AlphaISelLowering.h
Nate Begeman
natebegeman at mac.com
Fri Jan 27 19:14:44 PST 2006
Changes in directory llvm/lib/Target/Alpha:
AlphaISelLowering.cpp updated: 1.33 -> 1.34
AlphaISelLowering.h updated: 1.13 -> 1.14
---
Log message:
Implement Promote for VAARG, and allow it to be custom promoted for people
who don't want the default behavior (Alpha).
---
Diffs of the changes: (+12 -0)
AlphaISelLowering.cpp | 11 +++++++++++
AlphaISelLowering.h | 1 +
2 files changed, 12 insertions(+)
Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.33 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.34
--- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.33 Fri Jan 27 17:39:00 2006
+++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Fri Jan 27 21:14:31 2006
@@ -141,6 +141,7 @@
setOperationAction(ISD::VAEND, MVT::Other, Expand);
setOperationAction(ISD::VACOPY, MVT::Other, Custom);
setOperationAction(ISD::VAARG, MVT::Other, Custom);
+ setOperationAction(ISD::VAARG, MVT::i32, Custom);
setStackPointerRegisterToSaveRestore(Alpha::R30);
@@ -691,3 +692,13 @@
return SDOperand();
}
+
+SDOperand AlphaTargetLowering::CustomPromoteOperation(SDOperand Op,
+ SelectionDAG &DAG) {
+ assert(Op.getValueType() == MVT::i32 &&
+ Op.getOpcode() == ISD::VAARG &&
+ "Unknown node to custom promote!");
+
+ // The code in LowerOperation already handles i32 vaarg
+ return LowerOperation(Op, DAG);
+}
Index: llvm/lib/Target/Alpha/AlphaISelLowering.h
diff -u llvm/lib/Target/Alpha/AlphaISelLowering.h:1.13 llvm/lib/Target/Alpha/AlphaISelLowering.h:1.14
--- llvm/lib/Target/Alpha/AlphaISelLowering.h:1.13 Fri Jan 27 17:39:00 2006
+++ llvm/lib/Target/Alpha/AlphaISelLowering.h Fri Jan 27 21:14:31 2006
@@ -62,6 +62,7 @@
/// LowerOperation - Provide custom lowering hooks for some operations.
///
virtual SDOperand LowerOperation(SDOperand Op, SelectionDAG &DAG);
+ virtual SDOperand CustomPromoteOperation(SDOperand Op, SelectionDAG &DAG);
//Friendly names for dumps
const char *getTargetNodeName(unsigned Opcode) const;
More information about the llvm-commits
mailing list