blob: d0ae2d8e71c806fe485e1c36b0ef8d11c4bbc16e [file] [log] [blame]
Scott Michel266bc8f2007-12-04 22:23:35 +00001//===-- SPUHazardRecognizers.h - Cell SPU Hazard Recognizer -----*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Scott Michel266bc8f2007-12-04 22:23:35 +00007//
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 Gohmanfc54c552009-01-15 22:18:12 +000018#include "llvm/CodeGen/ScheduleHazardRecognizer.h"
Scott Michel266bc8f2007-12-04 22:23:35 +000019
20namespace llvm {
Dan Gohmanfc54c552009-01-15 22:18:12 +000021
22class TargetInstrInfo;
Scott Michel266bc8f2007-12-04 22:23:35 +000023
24/// SPUHazardRecognizer
Dan Gohmanfc54c552009-01-15 22:18:12 +000025class SPUHazardRecognizer : public ScheduleHazardRecognizer
Scott Michel266bc8f2007-12-04 22:23:35 +000026{
27private:
28 const TargetInstrInfo &TII;
29 int EvenOdd;
30
31public:
32 SPUHazardRecognizer(const TargetInstrInfo &TII);
Dan Gohmanfc54c552009-01-15 22:18:12 +000033 virtual HazardType getHazardType(SUnit *SU);
34 virtual void EmitInstruction(SUnit *SU);
Scott Michel266bc8f2007-12-04 22:23:35 +000035 virtual void AdvanceCycle();
36 virtual void EmitNoop();
37};
38
39} // end namespace llvm
40
41#endif