ARMInstrInfo.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //===-- ARMInstrInfo.h - ARM Instruction Information ------------*- 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. //
  9. // This file contains the ARM implementation of the TargetInstrInfo class.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #ifndef LLVM_LIB_TARGET_ARM_ARMINSTRINFO_H
  13. #define LLVM_LIB_TARGET_ARM_ARMINSTRINFO_H
  14. #include "ARMBaseInstrInfo.h"
  15. #include "ARMRegisterInfo.h"
  16. namespace llvm {
  17. class ARMSubtarget;
  18. class ARMInstrInfo : public ARMBaseInstrInfo {
  19. ARMRegisterInfo RI;
  20. public:
  21. explicit ARMInstrInfo(const ARMSubtarget &STI);
  22. /// Return the noop instruction to use for a noop.
  23. MCInst getNop() const override;
  24. // Return the non-pre/post incrementing version of 'Opc'. Return 0
  25. // if there is not such an opcode.
  26. unsigned getUnindexedOpcode(unsigned Opc) const override;
  27. /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
  28. /// such, whenever a client has an instance of instruction info, it should
  29. /// always be able to get register info as well (through this method).
  30. ///
  31. const ARMRegisterInfo &getRegisterInfo() const override { return RI; }
  32. private:
  33. void expandLoadStackGuard(MachineBasicBlock::iterator MI) const override;
  34. };
  35. }
  36. #endif