aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>2012-12-11 09:10:33 +0000
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>2012-12-11 09:10:33 +0000
commit8163ca76f0b0d336c5436364ffb3b85be1162e7a (patch)
treed72fbe0625682a4e3a2bdb5508db3f93eeb8cf5b /include/llvm/Target
parent659dacd66fce1cff13661976200f6c7125e38678 (diff)
downloadexternal_llvm-8163ca76f0b0d336c5436364ffb3b85be1162e7a.zip
external_llvm-8163ca76f0b0d336c5436364ffb3b85be1162e7a.tar.gz
external_llvm-8163ca76f0b0d336c5436364ffb3b85be1162e7a.tar.bz2
Change TargetLowering::getRegClassFor to take an MVT, instead of EVT.
Accordingly, add helper funtions getSimpleValueType (in parallel to getValueType) in SDValue, SDNode, and TargetLowering. This is the first, in a series of patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169837 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetLowering.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index d2e2010..7eb8a0d 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -232,9 +232,8 @@ public:
/// getRegClassFor - Return the register class that should be used for the
/// specified value type.
- virtual const TargetRegisterClass *getRegClassFor(EVT VT) const {
- assert(VT.isSimple() && "getRegClassFor called on illegal type!");
- const TargetRegisterClass *RC = RegClassForVT[VT.getSimpleVT().SimpleTy];
+ virtual const TargetRegisterClass *getRegClassFor(MVT VT) const {
+ const TargetRegisterClass *RC = RegClassForVT[VT.SimpleTy];
assert(RC && "This value type is not natively supported!");
return RC;
}
@@ -588,7 +587,11 @@ public:
}
return EVT::getEVT(Ty, AllowUnknown);
}
-
+
+ /// Return the MVT corresponding to this LLVM type. See getValueType.
+ MVT getSimpleValueType(Type *Ty, bool AllowUnknown = false) const {
+ return getValueType(Ty, AllowUnknown).getSimpleVT();
+ }
/// getByValTypeAlignment - Return the desired alignment for ByVal aggregate
/// function arguments in the caller parameter area. This is the actual