[LLVMdev] Re: TableGen: RegisterClass question
ghost at cs.msu.su
Sun May 14 23:26:55 PDT 2006
Chris Lattner wrote:
>> // RegType - Specify the ValueType of the registers in this register
>> // class. Note that all registers in a register class must have the same
>> // ValueType.
>> list<ValueType> RegTypes = regTypes;
>> The comment seems out of date -- it says that only one type is allowed,
>> while list is used.
> Thanks, fixed!
>> Can somebody explain what would it mean for a register
>> class to have several allowed ValueTypes?
> This is useful for targets where multiple types of the same size can be
> held in the same registers. For example, if the target has a unified
> register file for Int/FP, it could have [i64, f64]. In practice, this is
> most useful for vector types, the X86 backend has [v16i8, v8i16, v4i32,
> v2i64, v4f32, v2f64].
Understood. How about the attached patch to clarify this in comment?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 773 bytes
Desc: not available
More information about the llvm-dev