diff options
author | Duncan Sands <baldrick@free.fr> | 2010-11-02 13:57:09 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-11-02 13:57:09 +0000 |
commit | 9da42434301d77f4f1ebf976943f836ec34c18da (patch) | |
tree | 9c12ff6876136ad45111de70c93af1bc92d25057 /include/llvm/CodeGen/ValueTypes.h | |
parent | 3127c7cc40fedd3b91fd26913d61e7a5a162dc0e (diff) | |
download | llvm-9da42434301d77f4f1ebf976943f836ec34c18da.tar.gz llvm-9da42434301d77f4f1ebf976943f836ec34c18da.tar.bz2 llvm-9da42434301d77f4f1ebf976943f836ec34c18da.tar.xz |
Add some comments explaining what MVT and EVT are, and how they differ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118014 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/ValueTypes.h')
-rw-r--r-- | include/llvm/CodeGen/ValueTypes.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index 292423e272..9e583ef4d6 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -26,7 +26,10 @@ namespace llvm { class LLVMContext; struct EVT; - class MVT { // MVT = Machine Value Type + /// MVT - Machine Value Type. Every type that is supported natively by some + /// processor targeted by LLVM occurs here. This means that any legal value + /// type can be represented by a MVT. + class MVT { public: enum SimpleValueType { // If you change this numbering, you must change the values in @@ -158,7 +161,7 @@ namespace llvm { return !(NElts & (NElts - 1)); } - /// getPow2VectorType - Widens the length of the given vector EVT up to + /// getPow2VectorType - Widens the length of the given vector MVT up to /// the nearest power of 2 and returns that type. MVT getPow2VectorType() const { if (isPow2VectorType()) @@ -353,7 +356,11 @@ namespace llvm { } }; - struct EVT { // EVT = Extended Value Type + + /// EVT - Extended Value Type. Capable of holding value types which are not + /// native for any processor (such as the i12345 type), as well as the types + /// a MVT can represent. + struct EVT { private: MVT V; const Type *LLVMTy; |