• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "llvm/CodeGen/ScheduleHazardRecognizer.h"
17 
18 namespace llvm {
19 
20 // Hazards related to FP MLx instructions
21 class ARMHazardRecognizerFPMLx : public ScheduleHazardRecognizer {
22   MachineInstr *LastMI = nullptr;
23   unsigned FpMLxStalls = 0;
24 
25 public:
ARMHazardRecognizerFPMLx()26   ARMHazardRecognizerFPMLx() : ScheduleHazardRecognizer() { MaxLookAhead = 1; }
27 
28   HazardType getHazardType(SUnit *SU, int Stalls) override;
29   void Reset() override;
30   void EmitInstruction(SUnit *SU) override;
31   void AdvanceCycle() override;
32   void RecedeCycle() override;
33 };
34 
35 } // end namespace llvm
36 
37 #endif
38