[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Jan 29 00:42:18 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.293 -> 1.294
---
Log message:
cleanups to the ValueTypeActions interface
---
Diffs of the changes: (+5 -7)
LegalizeDAG.cpp | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.293 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.294
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.293 Sun Jan 29 01:58:15 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sun Jan 29 02:42:06 2006
@@ -41,18 +41,16 @@
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 @@
/// 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.
More information about the llvm-commits
mailing list