AMDGPU: Mark test as XFAIL in expensive_checks builds
[llvm-project.git] / llvm / lib / Target / ARM / ARMHazardRecognizer.h
blobb9ac3555c2bc3c78cecce07e908c40d7fc5f5966
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.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_ARM_ARMHAZARDRECOGNIZER_H
14 #define LLVM_LIB_TARGET_ARM_ARMHAZARDRECOGNIZER_H
16 #include "ARMBaseInstrInfo.h"
17 #include "llvm/ADT/BitmaskEnum.h"
18 #include "llvm/ADT/SmallVector.h"
19 #include "llvm/CodeGen/ScheduleHazardRecognizer.h"
20 #include "llvm/Support/DataTypes.h"
21 #include <initializer_list>
23 namespace llvm {
25 class DataLayout;
26 class MachineFunction;
27 class MachineInstr;
28 class ScheduleDAG;
30 // Hazards related to FP MLx instructions
31 class ARMHazardRecognizerFPMLx : public ScheduleHazardRecognizer {
32 MachineInstr *LastMI = nullptr;
33 unsigned FpMLxStalls = 0;
35 public:
36 ARMHazardRecognizerFPMLx() { MaxLookAhead = 1; }
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;
45 // Hazards related to bank conflicts
46 class ARMBankConflictHazardRecognizer : public ScheduleHazardRecognizer {
47 SmallVector<MachineInstr *, 8> Accesses;
48 const MachineFunction &MF;
49 const DataLayout &DL;
50 int64_t DataMask;
51 bool AssumeITCMBankConflict;
53 public:
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;
62 private:
63 inline HazardType CheckOffsets(unsigned O0, unsigned O1);
66 } // end namespace llvm
68 #endif