blob: 30acaeaa36fb0d3ed60188e1405b8f82fca9c3d3 [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;
Andrew Trick6e8f4c42010-12-24 04:28:06 +000023
Scott Michel266bc8f2007-12-04 22:23:35 +000024/// SPUHazardRecognizer
Dan Gohmanfc54c552009-01-15 22:18:12 +000025class SPUHazardRecognizer : public ScheduleHazardRecognizer
Scott Michel266bc8f2007-12-04 22:23:35 +000026{
Scott Michel266bc8f2007-12-04 22:23:35 +000027public:
Benjamin Kramer95a9d932012-06-06 19:47:08 +000028 SPUHazardRecognizer(const TargetInstrInfo &/*TII*/) {}
Andrew Trick2da8bc82010-12-24 05:03:26 +000029 virtual HazardType getHazardType(SUnit *SU, int Stalls);
Dan Gohmanfc54c552009-01-15 22:18:12 +000030 virtual void EmitInstruction(SUnit *SU);
Scott Michel266bc8f2007-12-04 22:23:35 +000031 virtual void AdvanceCycle();
32 virtual void EmitNoop();
33};
34
35} // end namespace llvm
36
37#endif