diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-03-11 01:38:48 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-03-11 01:38:48 +0000 |
commit | 67ad03b1ef692749d54017ee0c5636d2c1f8602f (patch) | |
tree | a5ff47d2d87fbb53d7257daa0fa09f34acd8e44f /include/llvm/CodeGen | |
parent | 7a37166a7a2c0c5dd8f8c5d8320f8f7505437f53 (diff) | |
download | llvm-67ad03b1ef692749d54017ee0c5636d2c1f8602f.tar.gz llvm-67ad03b1ef692749d54017ee0c5636d2c1f8602f.tar.bz2 llvm-67ad03b1ef692749d54017ee0c5636d2c1f8602f.tar.xz |
Add helpers for getting scalar sizes of vector value types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 4 | ||||
-rw-r--r-- | include/llvm/CodeGen/ValueTypes.h | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 072b6af4d7..74c291eba1 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -145,6 +145,10 @@ public: return getValueType().getSizeInBits(); } + unsigned getScalarValueSizeInBits() const { + return getValueType().getScalarType().getSizeInBits(); + } + // Forwarding methods - These forward to the corresponding methods in SDNode. inline unsigned getOpcode() const; inline unsigned getNumOperands() const; diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index d59670410b..982e23c611 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -434,6 +434,10 @@ namespace llvm { } } + unsigned getScalarSizeInBits() const { + return getScalarType().getSizeInBits(); + } + /// getStoreSize - Return the number of bytes overwritten by a store /// of the specified value type. unsigned getStoreSize() const { @@ -788,6 +792,10 @@ namespace llvm { return getExtendedSizeInBits(); } + unsigned getScalarSizeInBits() const { + return getScalarType().getSizeInBits(); + } + /// getStoreSize - Return the number of bytes overwritten by a store /// of the specified value type. unsigned getStoreSize() const { |