forked from OSchip/llvm-project
[AArch64][RegisterBankInfo] Use the static opds mapping for alt mappings
Avoid to rely on the dynamically allocated operands mapping for the alternative mapping. NFC. llvm-svn: 282956
This commit is contained in:
parent
b7e7a5473d
commit
b2308987ab
|
@ -248,20 +248,13 @@ AArch64RegisterBankInfo::getInstrAlternativeMappings(
|
|||
/*NumOperands*/ 3);
|
||||
InstructionMapping FPRMapping(/*ID*/ 2, /*Cost*/ 1, nullptr,
|
||||
/*NumOperands*/ 3);
|
||||
GPRMapping.setOperandsMapping(getOperandsMapping(
|
||||
{&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
||||
AArch64::FirstGPR],
|
||||
&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
||||
AArch64::FirstGPR],
|
||||
&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
||||
AArch64::FirstGPR]}));
|
||||
FPRMapping.setOperandsMapping(getOperandsMapping(
|
||||
{&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
||||
AArch64::FirstFPR],
|
||||
&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
||||
AArch64::FirstFPR],
|
||||
&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
||||
AArch64::FirstFPR]}));
|
||||
unsigned RBIdx = AArch64::getRegBankBaseIdx(Size);
|
||||
GPRMapping.setOperandsMapping(
|
||||
&AArch64::ValMappings[AArch64::First3OpsIdx +
|
||||
(RBIdx + AArch64::FirstGPR) * 3]);
|
||||
FPRMapping.setOperandsMapping(
|
||||
&AArch64::ValMappings[AArch64::First3OpsIdx +
|
||||
(RBIdx + AArch64::FirstFPR) * 3]);
|
||||
AltMappings.emplace_back(std::move(GPRMapping));
|
||||
AltMappings.emplace_back(std::move(FPRMapping));
|
||||
return AltMappings;
|
||||
|
|
Loading…
Reference in New Issue