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);
|
/*NumOperands*/ 3);
|
||||||
InstructionMapping FPRMapping(/*ID*/ 2, /*Cost*/ 1, nullptr,
|
InstructionMapping FPRMapping(/*ID*/ 2, /*Cost*/ 1, nullptr,
|
||||||
/*NumOperands*/ 3);
|
/*NumOperands*/ 3);
|
||||||
GPRMapping.setOperandsMapping(getOperandsMapping(
|
unsigned RBIdx = AArch64::getRegBankBaseIdx(Size);
|
||||||
{&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
GPRMapping.setOperandsMapping(
|
||||||
AArch64::FirstGPR],
|
&AArch64::ValMappings[AArch64::First3OpsIdx +
|
||||||
&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
(RBIdx + AArch64::FirstGPR) * 3]);
|
||||||
AArch64::FirstGPR],
|
FPRMapping.setOperandsMapping(
|
||||||
&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
&AArch64::ValMappings[AArch64::First3OpsIdx +
|
||||||
AArch64::FirstGPR]}));
|
(RBIdx + AArch64::FirstFPR) * 3]);
|
||||||
FPRMapping.setOperandsMapping(getOperandsMapping(
|
|
||||||
{&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
|
||||||
AArch64::FirstFPR],
|
|
||||||
&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
|
||||||
AArch64::FirstFPR],
|
|
||||||
&AArch64::ValMappings[AArch64::getRegBankBaseIdx(Size) +
|
|
||||||
AArch64::FirstFPR]}));
|
|
||||||
AltMappings.emplace_back(std::move(GPRMapping));
|
AltMappings.emplace_back(std::move(GPRMapping));
|
||||||
AltMappings.emplace_back(std::move(FPRMapping));
|
AltMappings.emplace_back(std::move(FPRMapping));
|
||||||
return AltMappings;
|
return AltMappings;
|
||||||
|
|
Loading…
Reference in New Issue