[LLVMdev] Determining Register Class of an Operand

Tim Northover t.p.northover at gmail.com
Thu Jun 6 10:04:15 PDT 2013


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.

Cheers.

Tim.



More information about the llvm-dev mailing list