1 //===-- ARMHazardRecognizer.h - ARM Hazard Recognizers ----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines hazard recognizers for scheduling ARM functions.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_ARM_ARMHAZARDRECOGNIZER_H
15 #define LLVM_LIB_TARGET_ARM_ARMHAZARDRECOGNIZER_H
17 #include "llvm/CodeGen/ScoreboardHazardRecognizer.h"
21 class ARMBaseInstrInfo;
22 class ARMBaseRegisterInfo;
26 /// ARMHazardRecognizer handles special constraints that are not expressed in
27 /// the scheduling itinerary. This is only used during postRA scheduling. The
28 /// ARM preRA scheduler uses an unspecialized instance of the
29 /// ScoreboardHazardRecognizer.
30 class ARMHazardRecognizer : public ScoreboardHazardRecognizer {
35 ARMHazardRecognizer(const InstrItineraryData *ItinData,
36 const ScheduleDAG *DAG)
37 : ScoreboardHazardRecognizer(ItinData, DAG, "post-RA-sched"),
40 HazardType getHazardType(SUnit *SU, int Stalls) override;
41 void Reset() override;
42 void EmitInstruction(SUnit *SU) override;
43 void AdvanceCycle() override;
44 void RecedeCycle() override;
47 } // end namespace llvm