diff options
author | Patrik Hagglund <patrik.h.hagglund@ericsson.com> | 2012-12-11 09:10:33 +0000 |
---|---|---|
committer | Patrik Hagglund <patrik.h.hagglund@ericsson.com> | 2012-12-11 09:10:33 +0000 |
commit | 8163ca76f0b0d336c5436364ffb3b85be1162e7a (patch) | |
tree | d72fbe0625682a4e3a2bdb5508db3f93eeb8cf5b /include/llvm/CodeGen/SelectionDAGNodes.h | |
parent | 659dacd66fce1cff13661976200f6c7125e38678 (diff) | |
download | external_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/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 252d9ca1..d5acdac 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -130,6 +130,11 @@ public: /// inline EVT getValueType() const; + /// Return the simple ValueType of the referenced return value. + MVT getSimpleValueType() const { + return getValueType().getSimpleVT(); + } + /// getValueSizeInBits - Returns the size of the value in bits. /// unsigned getValueSizeInBits() const { @@ -595,6 +600,12 @@ public: return ValueList[ResNo]; } + /// Return the type of a specified result as a simple type. + /// + MVT getSimpleValueType(unsigned ResNo) const { + return getValueType(ResNo).getSimpleVT(); + } + /// getValueSizeInBits - Returns MVT::getSizeInBits(getValueType(ResNo)). /// unsigned getValueSizeInBits(unsigned ResNo) const { |