Silence -Wunused-variable in release builds.
[llvm/stm8.git] / lib / Target / ARM / ARMHazardRecognizer.h
blob2bc218d8566b68969af008bb1922c691dd33a281
1 //===-- ARMHazardRecognizer.h - ARM Hazard Recognizers ----------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines hazard recognizers for scheduling ARM functions.
12 //===----------------------------------------------------------------------===//
14 #ifndef ARMHAZARDRECOGNIZER_H
15 #define ARMHAZARDRECOGNIZER_H
17 #include "llvm/CodeGen/ScoreboardHazardRecognizer.h"
19 namespace llvm {
21 class ARMBaseInstrInfo;
22 class ARMBaseRegisterInfo;
23 class ARMSubtarget;
24 class MachineInstr;
26 class ARMHazardRecognizer : public ScoreboardHazardRecognizer {
27 const ARMBaseInstrInfo &TII;
28 const ARMBaseRegisterInfo &TRI;
29 const ARMSubtarget &STI;
31 MachineInstr *LastMI;
32 unsigned FpMLxStalls;
33 unsigned ITBlockSize; // No. of MIs in current IT block yet to be scheduled.
34 MachineInstr *ITBlockMIs[4];
36 public:
37 ARMHazardRecognizer(const InstrItineraryData *ItinData,
38 const ARMBaseInstrInfo &tii,
39 const ARMBaseRegisterInfo &tri,
40 const ARMSubtarget &sti,
41 const ScheduleDAG *DAG) :
42 ScoreboardHazardRecognizer(ItinData, DAG, "post-RA-sched"), TII(tii),
43 TRI(tri), STI(sti), LastMI(0), ITBlockSize(0) {}
45 virtual HazardType getHazardType(SUnit *SU, int Stalls);
46 virtual void Reset();
47 virtual void EmitInstruction(SUnit *SU);
48 virtual void AdvanceCycle();
49 virtual void RecedeCycle();
52 } // end namespace llvm
54 #endif // ARMHAZARDRECOGNIZER_H