xref: /freebsd/contrib/llvm-project/llvm/lib/Target/M68k/GISel/M68kRegisterBankInfo.h (revision 81ad626541db97eb356e2c1d4a20eb2a26a766ab)
104eeddc0SDimitry Andric //===-- M68kRegisterBankInfo.h ----------------------------------*- C++ -*-===//
2349cc55cSDimitry Andric //
3349cc55cSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4349cc55cSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5349cc55cSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6349cc55cSDimitry Andric //
7349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
8349cc55cSDimitry Andric /// \file
9349cc55cSDimitry Andric /// This file declares the targeting of the RegisterBankInfo class for M68k.
10349cc55cSDimitry Andric /// \todo This should be generated by TableGen.
11349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
12349cc55cSDimitry Andric 
13349cc55cSDimitry Andric #ifndef LLVM_LIB_TARGET_M68K_GLSEL_M68KREGISTERBANKINFO_H
14349cc55cSDimitry Andric #define LLVM_LIB_TARGET_M68K_GLSEL_M68KREGISTERBANKINFO_H
15349cc55cSDimitry Andric 
16*81ad6265SDimitry Andric #include "llvm/CodeGen/RegisterBankInfo.h"
17349cc55cSDimitry Andric 
18349cc55cSDimitry Andric #define GET_REGBANK_DECLARATIONS
19349cc55cSDimitry Andric #include "M68kGenRegisterBank.inc"
20349cc55cSDimitry Andric #undef GET_REGBANK_DECLARATIONS
21349cc55cSDimitry Andric 
22349cc55cSDimitry Andric namespace llvm {
23349cc55cSDimitry Andric 
24349cc55cSDimitry Andric class TargetRegisterInfo;
25349cc55cSDimitry Andric 
26349cc55cSDimitry Andric class M68kGenRegisterBankInfo : public RegisterBankInfo {
27349cc55cSDimitry Andric protected:
28349cc55cSDimitry Andric #define GET_TARGET_REGBANK_CLASS
29349cc55cSDimitry Andric #include "M68kGenRegisterBank.inc"
30349cc55cSDimitry Andric #undef GET_TARGET_REGBANK_CLASS
31349cc55cSDimitry Andric };
32349cc55cSDimitry Andric 
33349cc55cSDimitry Andric /// This class provides the information for the target register banks.
34349cc55cSDimitry Andric class M68kRegisterBankInfo final : public M68kGenRegisterBankInfo {
35349cc55cSDimitry Andric public:
36349cc55cSDimitry Andric   M68kRegisterBankInfo(const TargetRegisterInfo &TRI);
37349cc55cSDimitry Andric 
38349cc55cSDimitry Andric   const RegisterBank &getRegBankFromRegClass(const TargetRegisterClass &RC,
39349cc55cSDimitry Andric                                              LLT) const override;
40349cc55cSDimitry Andric 
41349cc55cSDimitry Andric   const InstructionMapping &
42349cc55cSDimitry Andric   getInstrMapping(const MachineInstr &MI) const override;
43349cc55cSDimitry Andric };
44349cc55cSDimitry Andric } // end namespace llvm
4504eeddc0SDimitry Andric #endif // LLVM_LIB_TARGET_M68K_GLSEL_M68KREGISTERBANKINFO_H
46