aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/ValueTypes.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-11-03 11:35:31 +0000
committerDuncan Sands <baldrick@free.fr>2010-11-03 11:35:31 +0000
commit1440e8b918d7116c3587cb95f4f7ac7a0a0b65ad (patch)
tree667c874fcb8f88caa625225f4e45383198140e86 /include/llvm/CodeGen/ValueTypes.h
parentcaebdd44f3a2c89457f09d0fa45a998c912235d2 (diff)
downloadexternal_llvm-1440e8b918d7116c3587cb95f4f7ac7a0a0b65ad.zip
external_llvm-1440e8b918d7116c3587cb95f4f7ac7a0a0b65ad.tar.gz
external_llvm-1440e8b918d7116c3587cb95f4f7ac7a0a0b65ad.tar.bz2
Inside the calling convention logic LocVT is always a simple
value type, so there is no point in passing it around using an EVT. Use the simpler MVT everywhere. Rather than trying to propagate this information maximally in all the code that using the calling convention stuff, I chose to do a mainly low impact change instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/ValueTypes.h')
-rw-r--r--include/llvm/CodeGen/ValueTypes.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h
index 9e583ef..0ba5f6c 100644
--- a/include/llvm/CodeGen/ValueTypes.h
+++ b/include/llvm/CodeGen/ValueTypes.h
@@ -133,6 +133,7 @@ namespace llvm {
bool operator>(const MVT& S) const { return SimpleTy > S.SimpleTy; }
bool operator<(const MVT& S) const { return SimpleTy < S.SimpleTy; }
bool operator==(const MVT& S) const { return SimpleTy == S.SimpleTy; }
+ bool operator!=(const MVT& S) const { return SimpleTy != S.SimpleTy; }
bool operator>=(const MVT& S) const { return SimpleTy >= S.SimpleTy; }
bool operator<=(const MVT& S) const { return SimpleTy <= S.SimpleTy; }
@@ -280,6 +281,18 @@ namespace llvm {
}
}
+ /// 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 getStoreSize() * 8;
+ }
+
static MVT getFloatingPointVT(unsigned BitWidth) {
switch (BitWidth) {
default: