[LLVMdev] Register classes, value types
Jonas Paulsson
jnspaulsson at hotmail.com
Fri Nov 25 08:35:07 PST 2011
I have registers that can hold either integer or floating point values. There are instructions for integer operands, floating operands, and also a "mixed" type operand, ie an operand that is the result of either an integer or floating point operation.
I see that the RegisterClass has a list of ValueTypes, and I conclude that I can define a register class to use for the mixed operands that has both integer and floating point valuetypes. I would like to do:
reg:IntRC = IntegerOp...
~or~
reg:FloatRC = FloatOp ...
...
consumingMI regOp:MixedRC
IntRC = [i32], "reg1,...", FloatRC = [f32], "reg1, ...", MixedRC = [i32, f32], "reg1, ...".
Does this approach seem fair? What are the consequences in the backend for the different value types for operands?
/Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111125/c06121a9/attachment.html>
More information about the llvm-dev
mailing list