blob: f6f618dd9be01895faabd125e212c2731c57c96e [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//
5// This file was developed by a team from the Computer Systems Research
Scott Michel2466c372007-12-05 01:40:25 +00006// Department at The Aerospace Corporation and is distributed under the
7// University of Illinois Open Source License. See LICENSE.TXT for details.
Scott Michel266bc8f2007-12-04 22:23:35 +00008//
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
22namespace llvm {
23
24/// SPUHazardRecognizer
25class SPUHazardRecognizer : public HazardRecognizer
26{
27private:
28 const TargetInstrInfo &TII;
29 int EvenOdd;
30
31public:
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