mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-15 08:58:51 +00:00
[AArch64][GlobalISel] Use the generic DefaultMapping as the default.
This lets generic logic handle the common case, instead of having to implement applyMappingImpl for each instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281720 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f9c0a77050
commit
89f7a48a4a
@ -157,7 +157,6 @@ AArch64RegisterBankInfo::getInstrAlternativeMappings(
|
||||
void AArch64RegisterBankInfo::applyMappingImpl(
|
||||
const OperandsMapper &OpdMapper) const {
|
||||
switch (OpdMapper.getMI().getOpcode()) {
|
||||
case TargetOpcode::G_ADD:
|
||||
case TargetOpcode::G_OR: {
|
||||
// Those ID must match getInstrAlternativeMappings.
|
||||
assert((OpdMapper.getInstrMapping().getID() == 1 ||
|
||||
@ -187,7 +186,7 @@ AArch64RegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
|
||||
else
|
||||
BankID = AArch64::GPRRegBankID;
|
||||
|
||||
Mapping = InstructionMapping{1, 1, MI.getNumOperands()};
|
||||
Mapping = InstructionMapping{DefaultMappingID, 1, MI.getNumOperands()};
|
||||
int Size = Ty.isValid() ? Ty.getSizeInBits() : 0;
|
||||
for (unsigned Idx = 0; Idx < MI.getNumOperands(); ++Idx)
|
||||
Mapping.setOperandMapping(Idx, Size, getRegBank(BankID));
|
||||
|
Loading…
x
Reference in New Issue
Block a user