Scott Michel | 266bc8f | 2007-12-04 22:23:35 +0000 | [diff] [blame] | 1 | //===-- SPUHazardRecognizers.h - Cell SPU Hazard Recognizer -----*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 4ee451d | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Scott Michel | 266bc8f | 2007-12-04 22:23:35 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file defines hazard recognizers for scheduling on the Cell SPU |
| 11 | // processor. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef SPUHAZRECS_H |
| 16 | #define SPUHAZRECS_H |
| 17 | |
Dan Gohman | fc54c55 | 2009-01-15 22:18:12 +0000 | [diff] [blame] | 18 | #include "llvm/CodeGen/ScheduleHazardRecognizer.h" |
Scott Michel | 266bc8f | 2007-12-04 22:23:35 +0000 | [diff] [blame] | 19 | |
| 20 | namespace llvm { |
Dan Gohman | fc54c55 | 2009-01-15 22:18:12 +0000 | [diff] [blame] | 21 | |
| 22 | class TargetInstrInfo; |
Scott Michel | 266bc8f | 2007-12-04 22:23:35 +0000 | [diff] [blame] | 23 | |
| 24 | /// SPUHazardRecognizer |
Dan Gohman | fc54c55 | 2009-01-15 22:18:12 +0000 | [diff] [blame] | 25 | class SPUHazardRecognizer : public ScheduleHazardRecognizer |
Scott Michel | 266bc8f | 2007-12-04 22:23:35 +0000 | [diff] [blame] | 26 | { |
| 27 | private: |
| 28 | const TargetInstrInfo &TII; |
| 29 | int EvenOdd; |
| 30 | |
| 31 | public: |
| 32 | SPUHazardRecognizer(const TargetInstrInfo &TII); |
Dan Gohman | fc54c55 | 2009-01-15 22:18:12 +0000 | [diff] [blame] | 33 | virtual HazardType getHazardType(SUnit *SU); |
| 34 | virtual void EmitInstruction(SUnit *SU); |
Scott Michel | 266bc8f | 2007-12-04 22:23:35 +0000 | [diff] [blame] | 35 | virtual void AdvanceCycle(); |
| 36 | virtual void EmitNoop(); |
| 37 | }; |
| 38 | |
| 39 | } // end namespace llvm |
| 40 | |
| 41 | #endif |