[llvm-commits] [llvm] r44719 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h
Chris Lattner
sabre at nondot.org
Sat Dec 8 13:59:32 PST 2007
Author: lattner
Date: Sat Dec 8 15:59:32 2007
New Revision: 44719
URL: http://llvm.org/viewvc/llvm-project?rev=44719&view=rev
Log:
reorganize header to separate into functional blocks.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h?rev=44719&r1=44718&r2=44719&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h Sat Dec 8 15:59:32 2007
@@ -125,6 +125,15 @@
void RemapNode(SDOperand &N);
+ // Common routines.
+ SDOperand CreateStackStoreLoad(SDOperand Op, MVT::ValueType DestVT);
+ SDOperand HandleMemIntrinsic(SDNode *N);
+ void SplitOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi);
+
+ //===--------------------------------------------------------------------===//
+ // Promotion Support: LegalizeTypesPromote.cpp
+ //===--------------------------------------------------------------------===//
+
SDOperand GetPromotedOp(SDOperand Op) {
SDOperand &PromotedOp = PromotedNodes[Op];
RemapNode(PromotedOp);
@@ -132,7 +141,7 @@
return PromotedOp;
}
void SetPromotedOp(SDOperand Op, SDOperand Result);
-
+
/// GetPromotedZExtOp - Get a promoted operand and zero extend it to the final
/// size.
SDOperand GetPromotedZExtOp(SDOperand Op) {
@@ -140,23 +149,7 @@
Op = GetPromotedOp(Op);
return DAG.getZeroExtendInReg(Op, OldVT);
}
-
- void GetExpandedOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi);
- void SetExpandedOp(SDOperand Op, SDOperand Lo, SDOperand Hi);
-
- SDOperand GetScalarizedOp(SDOperand Op) {
- SDOperand &ScalarOp = ScalarizedNodes[Op];
- RemapNode(ScalarOp);
- assert(ScalarOp.Val && "Operand wasn't scalarized?");
- return ScalarOp;
- }
- void SetScalarizedOp(SDOperand Op, SDOperand Result);
-
- // Common routines.
- SDOperand CreateStackStoreLoad(SDOperand Op, MVT::ValueType DestVT);
- SDOperand HandleMemIntrinsic(SDNode *N);
- void SplitOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi);
-
+
// Result Promotion.
void PromoteResult(SDNode *N, unsigned ResNo);
SDOperand PromoteResult_UNDEF(SDNode *N);
@@ -176,6 +169,30 @@
SDOperand PromoteResult_SELECT (SDNode *N);
SDOperand PromoteResult_SELECT_CC(SDNode *N);
+ // Operand Promotion.
+ bool PromoteOperand(SDNode *N, unsigned OperandNo);
+ SDOperand PromoteOperand_ANY_EXTEND(SDNode *N);
+ SDOperand PromoteOperand_ZERO_EXTEND(SDNode *N);
+ SDOperand PromoteOperand_SIGN_EXTEND(SDNode *N);
+ SDOperand PromoteOperand_TRUNCATE(SDNode *N);
+ SDOperand PromoteOperand_FP_EXTEND(SDNode *N);
+ SDOperand PromoteOperand_FP_ROUND(SDNode *N);
+ SDOperand PromoteOperand_INT_TO_FP(SDNode *N);
+ SDOperand PromoteOperand_SELECT(SDNode *N, unsigned OpNo);
+ SDOperand PromoteOperand_BRCOND(SDNode *N, unsigned OpNo);
+ SDOperand PromoteOperand_BR_CC(SDNode *N, unsigned OpNo);
+ SDOperand PromoteOperand_SETCC(SDNode *N, unsigned OpNo);
+ SDOperand PromoteOperand_STORE(StoreSDNode *N, unsigned OpNo);
+
+ void PromoteSetCCOperands(SDOperand &LHS,SDOperand &RHS, ISD::CondCode Code);
+
+ //===--------------------------------------------------------------------===//
+ // Expansion Support: LegalizeTypesExpand.cpp
+ //===--------------------------------------------------------------------===//
+
+ void GetExpandedOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi);
+ void SetExpandedOp(SDOperand Op, SDOperand Lo, SDOperand Hi);
+
// Result Expansion.
void ExpandResult(SDNode *N, unsigned ResNo);
void ExpandResult_UNDEF (SDNode *N, SDOperand &Lo, SDOperand &Hi);
@@ -203,34 +220,6 @@
SDOperand &Lo, SDOperand &Hi);
bool ExpandShiftWithKnownAmountBit(SDNode *N, SDOperand &Lo, SDOperand &Hi);
- // Result Vector Scalarization: <1 x ty> -> ty.
- void ScalarizeResult(SDNode *N, unsigned OpNo);
- SDOperand ScalarizeRes_UNDEF(SDNode *N);
- SDOperand ScalarizeRes_LOAD(LoadSDNode *N);
- SDOperand ScalarizeRes_BinOp(SDNode *N);
- SDOperand ScalarizeRes_UnaryOp(SDNode *N);
- SDOperand ScalarizeRes_FPOWI(SDNode *N);
- SDOperand ScalarizeRes_VECTOR_SHUFFLE(SDNode *N);
- SDOperand ScalarizeRes_BIT_CONVERT(SDNode *N);
- SDOperand ScalarizeRes_SELECT(SDNode *N);
-
- // Operand Promotion.
- bool PromoteOperand(SDNode *N, unsigned OperandNo);
- SDOperand PromoteOperand_ANY_EXTEND(SDNode *N);
- SDOperand PromoteOperand_ZERO_EXTEND(SDNode *N);
- SDOperand PromoteOperand_SIGN_EXTEND(SDNode *N);
- SDOperand PromoteOperand_TRUNCATE(SDNode *N);
- SDOperand PromoteOperand_FP_EXTEND(SDNode *N);
- SDOperand PromoteOperand_FP_ROUND(SDNode *N);
- SDOperand PromoteOperand_INT_TO_FP(SDNode *N);
- SDOperand PromoteOperand_SELECT(SDNode *N, unsigned OpNo);
- SDOperand PromoteOperand_BRCOND(SDNode *N, unsigned OpNo);
- SDOperand PromoteOperand_BR_CC(SDNode *N, unsigned OpNo);
- SDOperand PromoteOperand_SETCC(SDNode *N, unsigned OpNo);
- SDOperand PromoteOperand_STORE(StoreSDNode *N, unsigned OpNo);
-
- void PromoteSetCCOperands(SDOperand &LHS,SDOperand &RHS, ISD::CondCode Code);
-
// Operand Expansion.
bool ExpandOperand(SDNode *N, unsigned OperandNo);
SDOperand ExpandOperand_TRUNCATE(SDNode *N);
@@ -240,10 +229,33 @@
SDOperand ExpandOperand_EXTRACT_ELEMENT(SDNode *N);
SDOperand ExpandOperand_SETCC(SDNode *N);
SDOperand ExpandOperand_STORE(StoreSDNode *N, unsigned OpNo);
-
+
void ExpandSetCCOperands(SDOperand &NewLHS, SDOperand &NewRHS,
ISD::CondCode &CCCode);
+ //===--------------------------------------------------------------------===//
+ // Scalarization Support: LegalizeTypesScalarize.cpp
+ //===--------------------------------------------------------------------===//
+
+ SDOperand GetScalarizedOp(SDOperand Op) {
+ SDOperand &ScalarOp = ScalarizedNodes[Op];
+ RemapNode(ScalarOp);
+ assert(ScalarOp.Val && "Operand wasn't scalarized?");
+ return ScalarOp;
+ }
+ void SetScalarizedOp(SDOperand Op, SDOperand Result);
+
+ // Result Vector Scalarization: <1 x ty> -> ty.
+ void ScalarizeResult(SDNode *N, unsigned OpNo);
+ SDOperand ScalarizeRes_UNDEF(SDNode *N);
+ SDOperand ScalarizeRes_LOAD(LoadSDNode *N);
+ SDOperand ScalarizeRes_BinOp(SDNode *N);
+ SDOperand ScalarizeRes_UnaryOp(SDNode *N);
+ SDOperand ScalarizeRes_FPOWI(SDNode *N);
+ SDOperand ScalarizeRes_VECTOR_SHUFFLE(SDNode *N);
+ SDOperand ScalarizeRes_BIT_CONVERT(SDNode *N);
+ SDOperand ScalarizeRes_SELECT(SDNode *N);
+
// Operand Vector Scalarization: <1 x ty> -> ty.
bool ScalarizeOperand(SDNode *N, unsigned OpNo);
SDOperand ScalarizeOp_EXTRACT_VECTOR_ELT(SDNode *N, unsigned OpNo);
More information about the llvm-commits
mailing list