| 1 | //===- WebAssemblyRegisterBankInfo.h ----------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | /// \file |
| 9 | /// This file declares the targeting of the RegisterBankInfo class for |
| 10 | /// WebAssembly. |
| 11 | /// \todo This should be generated by TableGen. |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERBANKINFO_H |
| 15 | #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERBANKINFO_H |
| 16 | |
| 17 | #include "llvm/CodeGen/RegisterBankInfo.h" |
| 18 | |
| 19 | #define GET_REGBANK_DECLARATIONS |
| 20 | #include "WebAssemblyGenRegisterBank.inc" |
| 21 | |
| 22 | namespace llvm { |
| 23 | |
| 24 | class TargetRegisterInfo; |
| 25 | |
| 26 | class WebAssemblyGenRegisterBankInfo : public RegisterBankInfo { |
| 27 | #define GET_TARGET_REGBANK_CLASS |
| 28 | #include "WebAssemblyGenRegisterBank.inc" |
| 29 | }; |
| 30 | |
| 31 | /// This class provides the information for the target register banks. |
| 32 | class WebAssemblyRegisterBankInfo final |
| 33 | : public WebAssemblyGenRegisterBankInfo { |
| 34 | public: |
| 35 | WebAssemblyRegisterBankInfo(const TargetRegisterInfo &TRI); |
| 36 | |
| 37 | const InstructionMapping & |
| 38 | getInstrMapping(const MachineInstr &MI) const override; |
| 39 | }; |
| 40 | } // end namespace llvm |
| 41 | #endif |
| 42 | |