[PATCH] D15614: TargetRegisterInfo: Add getRegAsmName()
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 11 14:51:35 PST 2016
echristo added a comment.
In http://reviews.llvm.org/D15614#322249, @tstellarAMD wrote:
> In http://reviews.llvm.org/D15614#322025, @echristo wrote:
>
> > Seems like extra complexity versus just doing what the PPC port did?
>
>
> How did the PPC port solve this? I haven't found anything in PPCISelLowering::getRegForInlineAsmConstraint() that seems to work-around the issue.
They did it via this:
class PPCReg<string n> : Register<n> {
let Namespace = "PPC";
}
// We identify all our registers with a 5-bit ID, for consistency's sake.
// GPR - One of the 32 32-bit general-purpose registers
class GPR<bits<5> num, string n> : PPCReg<n> {
let HWEncoding{4-0} = num;
}
Where it just sets the register rather than using the default. Take a look at lib/Target/PPCRegisterInfo.td.
http://reviews.llvm.org/D15614
More information about the llvm-commits
mailing list