[llvm-commits] [llvm] r118014 - /llvm/trunk/include/llvm/CodeGen/ValueTypes.h

Duncan Sands baldrick at free.fr
Tue Nov 2 06:57:10 PDT 2010


Author: baldrick
Date: Tue Nov  2 08:57:09 2010
New Revision: 118014

URL: http://llvm.org/viewvc/llvm-project?rev=118014&view=rev
Log:
Add some comments explaining what MVT and EVT are, and how they differ.

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=118014&r1=118013&r2=118014&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Tue Nov  2 08:57:09 2010
@@ -26,7 +26,10 @@
   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 @@
       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 @@
     }
   };
 
-  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;





More information about the llvm-commits mailing list