diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-29 08:42:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-29 08:42:06 +0000 |
commit | 68a17febc70d9beb5353454e0c6d136ca1e87605 (patch) | |
tree | 0ffb6866946a63ef797725b7b041c1dd5511b2c5 | |
parent | d9b55dd21ae4168d131b344d53eb19ac4468b23c (diff) |
cleanups to the ValueTypeActions interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25785 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 57e0077d91..08f7326deb 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -41,18 +41,16 @@ class SelectionDAGLegalize { TargetLowering &TLI; SelectionDAG &DAG; - /// LegalizeAction - This enum indicates what action we should take for each - /// value type the can occur in the program. enum LegalizeAction { - Legal, // The target natively supports this value type. - Promote, // This should be promoted to the next larger type. - Expand, // This integer type should be broken into smaller pieces. + Legal, // The target natively supports this operation. + Promote, // This operation should be executed in a larger type. + Expand, // Try to expand this to other ops, otherwise use a libcall. }; /// ValueTypeActions - This is a bitvector that contains two bits for each /// value type, where the two bits correspond to the LegalizeAction enum. /// This can be queried with "getTypeAction(VT)". - unsigned long long ValueTypeActions; + TargetLowering::ValueTypeActionImpl ValueTypeActions; /// LegalizedNodes - For nodes that are of legal width, and that have more /// than one use, this map indicates what regularized operand to use. This @@ -91,7 +89,7 @@ public: /// it is already legal or we need to expand it into multiple registers of /// smaller integer type, or we need to promote it to a larger type. LegalizeAction getTypeAction(MVT::ValueType VT) const { - return (LegalizeAction)((ValueTypeActions >> (2*VT)) & 3); + return (LegalizeAction)ValueTypeActions.getTypeAction(VT); } /// isTypeLegal - Return true if this type is legal on this target. |