| Evan Cheng | 62c7b5b | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 1 | //===-- ARMHazardRecognizer.h - ARM Hazard Recognizers ----------*- C++ -*-===// | 
|  | 2 | // | 
|  | 3 | //                     The LLVM Compiler Infrastructure | 
|  | 4 | // | 
|  | 5 | // This file is distributed under the University of Illinois Open Source | 
|  | 6 | // License. See LICENSE.TXT for details. | 
|  | 7 | // | 
|  | 8 | //===----------------------------------------------------------------------===// | 
|  | 9 | // | 
|  | 10 | // This file defines hazard recognizers for scheduling ARM functions. | 
|  | 11 | // | 
|  | 12 | //===----------------------------------------------------------------------===// | 
|  | 13 |  | 
| Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 14 | #ifndef LLVM_LIB_TARGET_ARM_ARMHAZARDRECOGNIZER_H | 
|  | 15 | #define LLVM_LIB_TARGET_ARM_ARMHAZARDRECOGNIZER_H | 
| Evan Cheng | 62c7b5b | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 16 |  | 
| Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 17 | #include "llvm/CodeGen/ScoreboardHazardRecognizer.h" | 
| Evan Cheng | 62c7b5b | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 18 |  | 
|  | 19 | namespace llvm { | 
|  | 20 |  | 
|  | 21 | class ARMBaseInstrInfo; | 
|  | 22 | class ARMBaseRegisterInfo; | 
|  | 23 | class ARMSubtarget; | 
|  | 24 | class MachineInstr; | 
|  | 25 |  | 
| Andrew Trick | 312b97c | 2011-11-29 19:33:49 +0000 | [diff] [blame] | 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. | 
| Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 30 | class ARMHazardRecognizer : public ScoreboardHazardRecognizer { | 
| Evan Cheng | 62c7b5b | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 31 | MachineInstr *LastMI; | 
| Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 32 | unsigned FpMLxStalls; | 
| Evan Cheng | 62c7b5b | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 33 |  | 
|  | 34 | public: | 
|  | 35 | ARMHazardRecognizer(const InstrItineraryData *ItinData, | 
| Bill Wendling | f95178e | 2013-06-07 05:54:19 +0000 | [diff] [blame] | 36 | const ScheduleDAG *DAG) | 
|  | 37 | : ScoreboardHazardRecognizer(ItinData, DAG, "post-RA-sched"), | 
| Craig Topper | e73658d | 2014-04-28 04:05:08 +0000 | [diff] [blame] | 38 | LastMI(nullptr) {} | 
| Evan Cheng | 62c7b5b | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 39 |  | 
| Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 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; | 
| Evan Cheng | 62c7b5b | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 45 | }; | 
|  | 46 |  | 
| Evan Cheng | 62c7b5b | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 47 | } // end namespace llvm | 
|  | 48 |  | 
| Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 49 | #endif |