summaryrefslogtreecommitdiff
path: root/lib/Target/AArch64/AArch64RegisterBankInfo.h
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2016-06-08 16:53:32 +0000
committerQuentin Colombet <qcolombet@apple.com>2016-06-08 16:53:32 +0000
commit792b56f6a7aba99d020bb2a4d4ee403f4db134e5 (patch)
treee52822f673e0c37b79a96f1cb6430a0ff38ea9cb /lib/Target/AArch64/AArch64RegisterBankInfo.h
parent75072bc260e53d13f17b9ed0bd7cc84e33e24b6c (diff)
[AArch64][RegisterBankInfo] G_OR are fine on either GPR or FPR.
Teach AArch64RegisterBankInfo that G_OR can be mapped on either GPR or FPR for 64-bit or 32-bit values. Add test cases demonstrating how this information is used to coalesce a computation on a single register bank. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272170 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AArch64RegisterBankInfo.h')
-rw-r--r--lib/Target/AArch64/AArch64RegisterBankInfo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/AArch64/AArch64RegisterBankInfo.h b/lib/Target/AArch64/AArch64RegisterBankInfo.h
index 69a21ec82cf..907bcfdea16 100644
--- a/lib/Target/AArch64/AArch64RegisterBankInfo.h
+++ b/lib/Target/AArch64/AArch64RegisterBankInfo.h
@@ -31,6 +31,9 @@ enum {
/// This class provides the information for the target register banks.
class AArch64RegisterBankInfo : public RegisterBankInfo {
+ /// See RegisterBankInfo::applyMapping.
+ void applyMappingImpl(const OperandsMapper &OpdMapper) const override;
+
public:
AArch64RegisterBankInfo(const TargetRegisterInfo &TRI);
/// Get the cost of a copy from \p B to \p A, or put differently,
@@ -56,6 +59,11 @@ public:
/// \todo This should be TableGen'ed.
const RegisterBank &
getRegBankFromRegClass(const TargetRegisterClass &RC) const override;
+
+ /// Get the alternative mappings for \p MI.
+ /// Alternative in the sense different from getInstrMapping.
+ InstructionMappings
+ getInstrAlternativeMappings(const MachineInstr &MI) const override;
};
} // End llvm namespace.
#endif