[llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Aug 24 09:35:10 PDT 2005
Changes in directory llvm/include/llvm/Target:
TargetLowering.h updated: 1.18 -> 1.19
---
Log message:
rename hasNativeSupportFor* -> is(Operation|Type)Legal.
---
Diffs of the changes: (+12 -10)
TargetLowering.h | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.18 llvm/include/llvm/Target/TargetLowering.h:1.19
--- llvm/include/llvm/Target/TargetLowering.h:1.18 Wed Jul 27 00:53:43 2005
+++ llvm/include/llvm/Target/TargetLowering.h Wed Aug 24 11:34:59 2005
@@ -99,10 +99,10 @@
return RC;
}
- /// hasNativeSupportFor - Return true if the target has native support for the
+ /// isTypeLegal - Return true if the target has native support for the
/// specified value type. This means that it has a register that directly
/// holds it without promotions or expansions.
- bool hasNativeSupportFor(MVT::ValueType VT) const {
+ bool isTypeLegal(MVT::ValueType VT) const {
return RegClassForVT[VT] != 0;
}
@@ -132,15 +132,17 @@
return LegalFPImmediates.end();
}
- /// getOperationAction - Return how this operation should be
+ /// getOperationAction - Return how this operation should be treated: either
+ /// it is legal, needs to be promoted to a larger size, needs to be
+ /// expanded to some other code sequence, or the target has a custom expander
+ /// for it.
LegalizeAction getOperationAction(unsigned Op, MVT::ValueType VT) const {
return (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3);
}
-
- /// hasNativeSupportForOperation - Return true if this operation is legal for
- /// this type.
- ///
- bool hasNativeSupportForOperation(unsigned Op, MVT::ValueType VT) const {
+
+ /// isOperationLegal - Return true if the specified operation is legal on this
+ /// target.
+ bool isOperationLegal(unsigned Op, MVT::ValueType VT) const {
return getOperationAction(Op, VT) == Legal;
}
@@ -154,8 +156,8 @@
NVT = (MVT::ValueType)(NVT+1);
assert(MVT::isInteger(NVT) == MVT::isInteger(VT) && NVT != MVT::isVoid &&
"Didn't find type to promote to!");
- } while (!hasNativeSupportFor(NVT) ||
- getOperationAction(Op, NVT) == Promote);
+ } while (!isTypeLegal(NVT) ||
+ getOperationAction(Op, NVT) == Promote);
return NVT;
}
More information about the llvm-commits
mailing list