[LLVMdev] Determining Register Class of an Operand

dag at cray.com dag at cray.com
Thu Jun 6 10:12:13 PDT 2013


Tim Northover <t.p.northover at gmail.com> writes:

> Hi David,
>
>> If I have two physical registers, A and B, how do I know whether I may
>> replace A with B in a machine instruction
>
> It sounds like TargetInstrInfo::getRegClass is the function you want.
> The result has a "contains" method as you'd expect.

Ah, perfect!  Thanks!

                                 -David



More information about the llvm-dev mailing list