[LLVMdev] How to use TargetLowering::addRegisterClass() for multiple register classes

Tom Stellard tom at stellard.net
Thu Oct 25 13:25:17 PDT 2012


On my target, most value types can be stored in two register classes.
For example:

def SReg_64 : RegisterClass<"AMDGPU", [i64], 64, (add SGPR_64, VCC, EXEC)>;
def VReg_64 : RegisterClass<"AMDGPU", [i64], 64, (add VGPR_64)>;

What criteria should I use to decide which register class to associate
with each type using TargetLowering::addRegisterClass() ?


More information about the llvm-dev mailing list