LLVM 20.0.0git
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
16#include "ARMBaseInstrInfo.h"
21#include <initializer_list>
22
23namespace llvm {
24
25class DataLayout;
26class MachineFunction;
27class MachineInstr;
28class ScheduleDAG;
29
30// Hazards related to FP MLx instructions
32 MachineInstr *LastMI = nullptr;
33 unsigned FpMLxStalls = 0;
34
35public:
37
38 HazardType getHazardType(SUnit *SU, int Stalls) override;
39 void Reset() override;
40 void EmitInstruction(SUnit *SU) override;
41 void AdvanceCycle() override;
42 void RecedeCycle() override;
43};
44
45// Hazards related to bank conflicts
48 const MachineFunction &MF;
49 const DataLayout &DL;
50 int64_t DataMask;
51 bool AssumeITCMBankConflict;
52
53public:
54 ARMBankConflictHazardRecognizer(const ScheduleDAG *DAG, int64_t DDM,
55 bool ABC);
56 HazardType getHazardType(SUnit *SU, int Stalls) override;
57 void Reset() override;
58 void EmitInstruction(SUnit *SU) override;
59 void AdvanceCycle() override;
60 void RecedeCycle() override;
61
62private:
63 inline HazardType CheckOffsets(unsigned O0, unsigned O1);
64};
65
66} // end namespace llvm
67
68#endif
This file defines the SmallVector class.
void Reset() override
Reset - This callback is invoked when a new block of instructions is about to be schedule.
void AdvanceCycle() override
AdvanceCycle - This callback is invoked whenever the next top-down instruction to be scheduled cannot...
void EmitInstruction(SUnit *SU) override
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard stat...
void RecedeCycle() override
RecedeCycle - This callback is invoked whenever the next bottom-up instruction to be scheduled cannot...
HazardType getHazardType(SUnit *SU, int Stalls) override
getHazardType - Return the hazard type of emitting this node.
void EmitInstruction(SUnit *SU) override
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard stat...
void RecedeCycle() override
RecedeCycle - This callback is invoked whenever the next bottom-up instruction to be scheduled cannot...
void AdvanceCycle() override
AdvanceCycle - This callback is invoked whenever the next top-down instruction to be scheduled cannot...
void Reset() override
Reset - This callback is invoked when a new block of instructions is about to be schedule.
HazardType getHazardType(SUnit *SU, int Stalls) override
getHazardType - Return the hazard type of emitting this node.
A parsed version of the target data layout string in and methods for querying it.
Definition: DataLayout.h:63
Representation of each machine instruction.
Definition: MachineInstr.h:69
Scheduling unit. This is a node in the scheduling DAG.
Definition: ScheduleDAG.h:242
HazardRecognizer - This determines whether or not an instruction can be issued this cycle,...
unsigned MaxLookAhead
MaxLookAhead - Indicate the number of cycles in the scoreboard state.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1209
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18