Evan Cheng | 8864594 | 2010-06-18 23:11:35 +0000 | [diff] [blame] | 1 | //===-- Thumb2HazardRecognizer.h - Thumb2 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 Thumb2 functions on |
| 11 | // ARM processors. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef THUMB2HAZARDRECOGNIZER_H |
| 16 | #define THUMB2HAZARDRECOGNIZER_H |
| 17 | |
| 18 | #include "llvm/CodeGen/PostRAHazardRecognizer.h" |
| 19 | |
| 20 | namespace llvm { |
| 21 | |
| 22 | class MachineInstr; |
| 23 | |
| 24 | class Thumb2HazardRecognizer : public PostRAHazardRecognizer { |
| 25 | unsigned ITBlockSize; // No. of MIs in current IT block yet to be scheduled. |
| 26 | MachineInstr *ITBlockMIs[4]; |
| 27 | |
| 28 | public: |
Evan Cheng | 3ef1c87 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 29 | Thumb2HazardRecognizer(const InstrItineraryData *ItinData) : |
Evan Cheng | 8864594 | 2010-06-18 23:11:35 +0000 | [diff] [blame] | 30 | PostRAHazardRecognizer(ItinData) {} |
| 31 | |
| 32 | virtual HazardType getHazardType(SUnit *SU); |
| 33 | virtual void Reset(); |
| 34 | virtual void EmitInstruction(SUnit *SU); |
| 35 | }; |
| 36 | |
| 37 | |
| 38 | } // end namespace llvm |
| 39 | |
| 40 | #endif // THUMB2HAZARDRECOGNIZER_H |