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 | // |
| 5 | // This file was developed by a team from the Computer Systems Research |
Scott Michel | 2466c37 | 2007-12-05 01:40:25 +0000 | [diff] [blame] | 6 | // Department at The Aerospace Corporation and is distributed under the |
| 7 | // University of Illinois Open Source License. See LICENSE.TXT for details. |
Scott Michel | 266bc8f | 2007-12-04 22:23:35 +0000 | [diff] [blame] | 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | // |
| 11 | // This file defines hazard recognizers for scheduling on the Cell SPU |
| 12 | // processor. |
| 13 | // |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | |
| 16 | #ifndef SPUHAZRECS_H |
| 17 | #define SPUHAZRECS_H |
| 18 | |
| 19 | #include "llvm/CodeGen/ScheduleDAG.h" |
| 20 | #include "SPUInstrInfo.h" |
| 21 | |
| 22 | namespace llvm { |
| 23 | |
| 24 | /// SPUHazardRecognizer |
| 25 | class SPUHazardRecognizer : public HazardRecognizer |
| 26 | { |
| 27 | private: |
| 28 | const TargetInstrInfo &TII; |
| 29 | int EvenOdd; |
| 30 | |
| 31 | public: |
| 32 | SPUHazardRecognizer(const TargetInstrInfo &TII); |
| 33 | virtual HazardType getHazardType(SDNode *Node); |
| 34 | virtual void EmitInstruction(SDNode *Node); |
| 35 | virtual void AdvanceCycle(); |
| 36 | virtual void EmitNoop(); |
| 37 | }; |
| 38 | |
| 39 | } // end namespace llvm |
| 40 | |
| 41 | #endif |
| 42 | |