ce602fd72f54b68986c3baf70cdbe9b0738a2d34
[oota-llvm.git] / lib / Target / CellSPU / SPUHazardRecognizers.h
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
6 // Department at The Aerospace Corporation.
7 //
8 // See README.txt for details.
9 //
10 //===----------------------------------------------------------------------===//
11 //
12 // This file defines hazard recognizers for scheduling on the Cell SPU
13 // processor.
14 //
15 //===----------------------------------------------------------------------===//
16
17 #ifndef SPUHAZRECS_H
18 #define SPUHAZRECS_H
19
20 #include "llvm/CodeGen/ScheduleDAG.h"
21 #include "SPUInstrInfo.h"
22
23 namespace llvm {
24   
25 /// SPUHazardRecognizer
26 class SPUHazardRecognizer : public HazardRecognizer
27 {
28 private:
29   const TargetInstrInfo &TII;
30   int EvenOdd;
31
32 public:
33   SPUHazardRecognizer(const TargetInstrInfo &TII);
34   virtual HazardType getHazardType(SDNode *Node);
35   virtual void EmitInstruction(SDNode *Node);
36   virtual void AdvanceCycle();
37   virtual void EmitNoop();
38 };
39
40 } // end namespace llvm
41
42 #endif
43