aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/LegalizeTypes.h
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2011-06-01 19:47:10 +0000
committerNadav Rotem <nadav.rotem@intel.com>2011-06-01 19:47:10 +0000
commit96e0c5477c41b316263e894bbb5821c7cdeb25ef (patch)
tree8c694aae459202eb40d936daeecb159c53020b75 /lib/CodeGen/SelectionDAG/LegalizeTypes.h
parentcf31f91931b257462a5a0059389977f6adea8dae (diff)
downloadexternal_llvm-96e0c5477c41b316263e894bbb5821c7cdeb25ef.zip
external_llvm-96e0c5477c41b316263e894bbb5821c7cdeb25ef.tar.gz
external_llvm-96e0c5477c41b316263e894bbb5821c7cdeb25ef.tar.bz2
Refactor LegalizeTypes: Erase LegalizeAction and make the type legalizer use
the TargetLowering enum. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeTypes.h')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeTypes.h33
1 files changed, 2 insertions, 31 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypes.h b/lib/CodeGen/SelectionDAG/LegalizeTypes.h
index b2daf85..3713f94 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeTypes.h
+++ b/lib/CodeGen/SelectionDAG/LegalizeTypes.h
@@ -57,16 +57,6 @@ public:
// 1+ - This is a node which has this many unprocessed operands.
};
private:
- enum LegalizeAction {
- Legal, // The target natively supports this type.
- PromoteInteger, // Replace this integer type with a larger one.
- ExpandInteger, // Split this integer type into two of half the size.
- SoftenFloat, // Convert this float type to a same size integer type.
- ExpandFloat, // Split this float type into two of half the size.
- ScalarizeVector, // Replace this one-element vector with its element type.
- SplitVector, // Split this vector type into two of half the size.
- WidenVector // This vector type should be widened into a larger vector.
- };
/// ValueTypeActions - This is a bitvector that contains two bits for each
/// simple value type, where the two bits correspond to the LegalizeAction
@@ -74,27 +64,8 @@ private:
TargetLowering::ValueTypeActionImpl ValueTypeActions;
/// getTypeAction - Return how we should legalize values of this type.
- LegalizeAction getTypeAction(EVT VT) const {
- switch (TLI.getTypeAction(*DAG.getContext(), VT)) {
- default:
- assert(false && "Unknown legalize action!");
- case TargetLowering::Legal:
- return Legal;
- case TargetLowering::TypePromoteInteger:
- return PromoteInteger;
- case TargetLowering::TypeExpandInteger:
- return ExpandInteger;
- case TargetLowering::TypeExpandFloat:
- return ExpandFloat;
- case TargetLowering::TypeSoftenFloat:
- return SoftenFloat;
- case TargetLowering::TypeWidenVector:
- return WidenVector;
- case TargetLowering::TypeScalarizeVector:
- return ScalarizeVector;
- case TargetLowering::TypeSplitVector:
- return SplitVector;
- }
+ TargetLowering::LegalizeTypeAction getTypeAction(EVT VT) const {
+ return TLI.getTypeAction(*DAG.getContext(), VT);
}
/// isTypeLegal - Return true if this type is legal on this target.