LLVM  9.0.0svn
ARMHazardRecognizer.h
Go to the documentation of this file.
1 //===-- ARMHazardRecognizer.h - ARM Hazard Recognizers ----------*- 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 defines hazard recognizers for scheduling ARM functions.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_ARM_ARMHAZARDRECOGNIZER_H
14 #define LLVM_LIB_TARGET_ARM_ARMHAZARDRECOGNIZER_H
15 
17 
18 namespace llvm {
19 
20 class ARMBaseInstrInfo;
21 class ARMBaseRegisterInfo;
22 class ARMSubtarget;
23 class MachineInstr;
24 
25 /// ARMHazardRecognizer handles special constraints that are not expressed in
26 /// the scheduling itinerary. This is only used during postRA scheduling. The
27 /// ARM preRA scheduler uses an unspecialized instance of the
28 /// ScoreboardHazardRecognizer.
30  MachineInstr *LastMI;
31  unsigned FpMLxStalls;
32 
33 public:
35  const ScheduleDAG *DAG)
36  : ScoreboardHazardRecognizer(ItinData, DAG, "post-RA-sched"),
37  LastMI(nullptr) {}
38 
39  HazardType getHazardType(SUnit *SU, int Stalls) override;
40  void Reset() override;
41  void EmitInstruction(SUnit *SU) override;
42  void AdvanceCycle() override;
43  void RecedeCycle() override;
44 };
45 
46 } // end namespace llvm
47 
48 #endif
void EmitInstruction(SUnit *SU) override
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard stat...
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Itinerary data supplied by a subtarget to be used by a target.
HazardType getHazardType(SUnit *SU, int Stalls) override
getHazardType - Return the hazard type of emitting this node.
ARMHazardRecognizer(const InstrItineraryData *ItinData, const ScheduleDAG *DAG)
void Reset() override
Reset - This callback is invoked when a new block of instructions is about to be schedule.
Representation of each machine instruction.
Definition: MachineInstr.h:63
ARMHazardRecognizer handles special constraints that are not expressed in the scheduling itinerary...
void AdvanceCycle() override
AdvanceCycle - This callback is invoked whenever the next top-down instruction to be scheduled cannot...
Scheduling unit. This is a node in the scheduling DAG.
Definition: ScheduleDAG.h:242
void RecedeCycle() override
RecedeCycle - This callback is invoked whenever the next bottom-up instruction to be scheduled cannot...