Add helpers for getting scalar sizes of vector value types.

llvm-svn: 203526
This commit is contained in:
Matt Arsenault 2014-03-11 01:38:48 +00:00
parent 023d2ca451
commit 3d99402131
2 changed files with 12 additions and 0 deletions

View File

@ -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;

View File

@ -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 {