ARMRegisterBankInfo.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //===- ARMRegisterBankInfo ---------------------------------------*- 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 ARM.
  10. /// \todo This should be generated by TableGen.
  11. //===----------------------------------------------------------------------===//
  12. #ifndef LLVM_LIB_TARGET_ARM_ARMREGISTERBANKINFO_H
  13. #define LLVM_LIB_TARGET_ARM_ARMREGISTERBANKINFO_H
  14. #include "llvm/CodeGen/RegisterBankInfo.h"
  15. #define GET_REGBANK_DECLARATIONS
  16. #include "ARMGenRegisterBank.inc"
  17. namespace llvm {
  18. class TargetRegisterInfo;
  19. class ARMGenRegisterBankInfo : public RegisterBankInfo {
  20. #define GET_TARGET_REGBANK_CLASS
  21. #include "ARMGenRegisterBank.inc"
  22. };
  23. /// This class provides the information for the target register banks.
  24. class ARMRegisterBankInfo final : public ARMGenRegisterBankInfo {
  25. public:
  26. ARMRegisterBankInfo(const TargetRegisterInfo &TRI);
  27. const RegisterBank &getRegBankFromRegClass(const TargetRegisterClass &RC,
  28. LLT) const override;
  29. const InstructionMapping &
  30. getInstrMapping(const MachineInstr &MI) const override;
  31. };
  32. } // End llvm namespace.
  33. #endif