blob: 69eb539ef10433373f32d14dbb8ff31e89b1095b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef RCC_LIB_TARGET_RISCV_GISEL_RISCVREGISTERBANKINFO_H
#define RCC_LIB_TARGET_RISCV_GISEL_RISCVREGISTERBANKINFO_H
#include "rcc/CodeGen/RegisterBankInfo.h"
namespace rcc::riscv {
class RISCVRegisterBankInfo final : public RegisterBankInfo {
public:
[[nodiscard]] Expected<RegisterBankSelection>
selectBank(const MachineFunction &Function, Register Reg, const VirtualRegisterInfo &Info,
const MachineInstr *Instruction, const TargetDescription &Target) const override;
[[nodiscard]] Expected<RegisterBankInstructionMapping>
getInstructionMapping(const MachineInstr &Instruction, const MachineFunction &Function,
const TargetDescription &Target) const override;
[[nodiscard]] Expected<void> constrainSelectedInstruction(MachineInstr &Instruction,
MachineFunction &Function,
const TargetDescription &Target) const;
[[nodiscard]] Expected<void> constrainRegister(MachineFunction &Function, Register Reg,
const TargetDescription &Target) const;
[[nodiscard]] Expected<void> validateInstruction(const MachineInstr &Instruction,
const MachineFunction &Function,
const TargetDescription &Target) const override;
};
} // namespace rcc::riscv
#endif // RCC_LIB_TARGET_RISCV_GISEL_RISCVREGISTERBANKINFO_H
|