[LLVMdev] can we define a physical register for both integer and floating point

Xiangyang Guo xguo6 at ncsu.edu
Fri May 8 13:02:58 PDT 2015


Hi,

My question sounds kind of silly, but can we define a physical register for
both integer and floating point in LLVM backend?

In the section "Defining a Register Class" in tutorial "Writing an LLVM
Backend", when we define a Register Class, we need to define the regType,
which makes sense to me. But if both integer and floating point are 32
bits, why cannot we use a physical register to represent different types of
numbers accordingly.

And what if my backend does not have floating point physical register, but
my IR has floating point virtual register?

Thanks

Xiangyang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150508/b3869fa5/attachment.html>


More information about the llvm-dev mailing list