blob: 042b53f0f8c310808114d0571ca60fa948894121 [file] [log] [blame]
Jia Liub22310f2012-02-18 12:03:15 +00001//===-- ARMInstrInfo.h - ARM Instruction Information ------------*- C++ -*-===//
Rafael Espindolaffdc24b2006-05-14 22:18:28 +00002//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Rafael Espindolaffdc24b2006-05-14 22:18:28 +00006//
7//===----------------------------------------------------------------------===//
8//
9// This file contains the ARM implementation of the TargetInstrInfo class.
10//
11//===----------------------------------------------------------------------===//
12
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000013#ifndef LLVM_LIB_TARGET_ARM_ARMINSTRINFO_H
14#define LLVM_LIB_TARGET_ARM_ARMINSTRINFO_H
Rafael Espindolaffdc24b2006-05-14 22:18:28 +000015
David Goodwinaf7451b2009-07-08 16:09:28 +000016#include "ARMBaseInstrInfo.h"
Rafael Espindolaffdc24b2006-05-14 22:18:28 +000017#include "ARMRegisterInfo.h"
18
19namespace llvm {
Evan Cheng10043e22007-01-19 07:51:42 +000020 class ARMSubtarget;
21
David Goodwinade05a32009-07-02 22:18:33 +000022class ARMInstrInfo : public ARMBaseInstrInfo {
23 ARMRegisterInfo RI;
24public:
25 explicit ARMInstrInfo(const ARMSubtarget &STI);
26
Hans Wennborg9b9a5352017-04-21 21:48:41 +000027 /// Return the noop instruction to use for a noop.
28 void getNoop(MCInst &NopInst) const override;
Jim Grosbach617f84dd2012-02-28 23:53:30 +000029
David Goodwinaf7451b2009-07-08 16:09:28 +000030 // Return the non-pre/post incrementing version of 'Opc'. Return 0
31 // if there is not such an opcode.
Craig Topper6bc27bf2014-03-10 02:09:33 +000032 unsigned getUnindexedOpcode(unsigned Opc) const override;
David Goodwinaf7451b2009-07-08 16:09:28 +000033
David Goodwinade05a32009-07-02 22:18:33 +000034 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
35 /// such, whenever a client has an instance of instruction info, it should
36 /// always be able to get register info as well (through this method).
37 ///
Craig Topper6bc27bf2014-03-10 02:09:33 +000038 const ARMRegisterInfo &getRegisterInfo() const override { return RI; }
Akira Hatanakae5b6e0d2014-07-25 19:31:34 +000039
40private:
Rafael Espindola82f46312016-06-28 15:18:26 +000041 void expandLoadStackGuard(MachineBasicBlock::iterator MI) const override;
Rafael Espindolaffdc24b2006-05-14 22:18:28 +000042};
43
Alexander Kornienkof00654e2015-06-23 09:49:53 +000044}
Rafael Espindolaffdc24b2006-05-14 22:18:28 +000045
46#endif