[llvm-commits] [llvm] r82653 - /llvm/trunk/include/llvm/CodeGen/ValueTypes.h
Dan Gohman
gohman at apple.com
Wed Sep 23 13:59:10 PDT 2009
Author: djg
Date: Wed Sep 23 15:59:10 2009
New Revision: 82653
URL: http://llvm.org/viewvc/llvm-project?rev=82653&view=rev
Log:
Add an EVT::getStoreSize function, like getStoreSizeInBits but in bytes.
Modified:
llvm/trunk/include/llvm/CodeGen/ValueTypes.h
Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=82653&r1=82652&r2=82653&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Wed Sep 23 15:59:10 2009
@@ -552,10 +552,16 @@
return getExtendedSizeInBits();
}
+ /// getStoreSize - Return the number of bytes overwritten by a store
+ /// of the specified value type.
+ unsigned getStoreSize() const {
+ return (getSizeInBits() + 7) / 8;
+ }
+
/// getStoreSizeInBits - Return the number of bits overwritten by a store
/// of the specified value type.
unsigned getStoreSizeInBits() const {
- return (getSizeInBits() + 7)/8*8;
+ return getStoreSize() * 8;
}
/// getRoundIntegerType - Rounds the bit-width of the given integer EVT up
More information about the llvm-commits
mailing list