[llvm-commits] CVS: llvm/include/llvm/CodeGen/CallingConvLower.h SelectionDAG.h SelectionDAGNodes.h ValueTypes.h

Chris Lattner clattner at apple.com
Mon Jun 25 23:02:06 PDT 2007


> Generalize MVT::ValueType and associated functions to be able to  
> represent
> extended vector types.

Whoa, I'm surprised to see this so soon!

> @@ -45,10 +46,6 @@
>
>      isVoid         =  12,   // This has no value
>
> -    Vector         =  13,   // This is an abstract vector type,  
> which will
> -                            // be expanded into a target vector  
> type, or scalars
> -                            // if no matching vector type is  
> available.
> -
>      v8i8           =  14,   //  8 x i8
>      v4i16          =  15,   //  4 x i16
>      v2i32          =  16,   //  2 x i32

Should the value of these all slide up to avoid the hole at "13"?

> @@ -76,64 +73,55 @@
>      iPTR           = 255

is 255 a good sentinel for iPTR anymore?  Would we gain anything by  
making SimpleTypeBits less than 8?


> +  /// MVT::ValueType - This type holds low-level value types.  
> Valid values
> +  /// include any of the values in the SimpleValueType enum, or  
> any value
> +  /// returned from a function in the MVT namespace that has a  
> ValueType
> +  /// return type. Any value type equal to one of the  
> SimpleValueType enum
> +  /// values is a "simple" value type. All other value types are  
> "extended".
> +  ///
> +  /// Note that simple doesn't necessary mean legal for the target  
> machine.
> +  /// All legal value types must be simple, but often there are  
> some simple
> +  /// value types that are not legal.
> +  typedef uint32_t ValueType;

This would be a great place to talk about what non-simple value types  
currently exist, and how they are encoded.


> +  /// MVT::isExtendedValueType - Test if the given ValueType is  
> extended
> +  /// (as opposed to being simple).
> +  static inline bool isExtendedValueType(ValueType VT) {
> +    return VT & ~SimpleTypeMask;
>    }

I notice that several places use !MVT::isExtendedValueType(VT).   
Please add MVT::isSimpleValueType()

Would it make sense to shrinkify these to MVT::isExtendedVT() and  
MVT::isSimpleVT()?  ValueType and the namespace are somewhat  
redundant with each other.

-Chris



More information about the llvm-commits mailing list