summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsRegisterBankInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/Mips/MipsRegisterBankInfo.h')
-rw-r--r--lib/Target/Mips/MipsRegisterBankInfo.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsRegisterBankInfo.h b/lib/Target/Mips/MipsRegisterBankInfo.h
index 176813c031ed..fa0f1c7bc941 100644
--- a/lib/Target/Mips/MipsRegisterBankInfo.h
+++ b/lib/Target/Mips/MipsRegisterBankInfo.h
@@ -38,8 +38,17 @@ public:
const InstructionMapping &
getInstrMapping(const MachineInstr &MI) const override;
+ /// Here we have to narrowScalar s64 operands to s32, combine away G_MERGE or
+ /// G_UNMERGE and erase instructions that became dead in the process. We
+ /// manually assign bank to def operand of all new instructions that were
+ /// created in the process since they will not end up in RegBankSelect loop.
void applyMappingImpl(const OperandsMapper &OpdMapper) const override;
+ /// RegBankSelect determined that s64 operand is better to be split into two
+ /// s32 operands in gprb. Here we manually set register banks of def operands
+ /// of newly created instructions since they will not get regbankselected.
+ void setRegBank(MachineInstr &MI, MachineRegisterInfo &MRI) const;
+
private:
/// Some instructions are used with both floating point and integer operands.
/// We assign InstType to such instructions as it helps us to avoid cross bank