[LLVMdev] [ptx] Propose a register class naming convention change
Dan Bailey
drb at dneg.com
Fri May 13 02:11:55 PDT 2011
That's fine with me. Unless there's a particular reason for it I would
suggest perhaps changing the immediate syntax as well to swap it round,
so it would be Immi32, Immi64, Immf32, etc. It doesn't bother me that
much the way it currently is, but when there are lots of operations
taking a register and an immediate, representing them in the same way
might be a little more consistent?
Personally, I think I also might prefer an underscore to make it more
readable for new users (Reg_u32, Reg_pred, Imm_i32, Imm_f32, etc).
That's maybe just my own preference, so feel free to do it as you've
suggested!
Dan
Che-Liang Chiou wrote:
> Hi,
>
> Current register class naming has a confusing prefix letter 'R' (it is
> my bad), such as the first 'R' of RRegu32 (for unsigned 32-bit
> registers).
>
> I propose a 'Reg' + type name naming convention for register classes; such as:
> Regu16, Regu32, Regf32, Regf64
> With one exception for predicate registers (capitalized first letter of 'pred'):
> RegPred
>
> Since predicate registers are special in the way that they can't be
> passed as arguments or load from/store to memory, I think a little
> name convention exception for it is okay.
>
> What do you think?
>
> If no objection, I will start making the change.
>
> Regards,
> Che-Liang
>
>
More information about the llvm-dev
mailing list