LLVM API Documentation
00001 //===-- SPUHazardRecognizers.h - Cell SPU Hazard Recognizer -----*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines hazard recognizers for scheduling on the Cell SPU 00011 // processor. 00012 // 00013 //===----------------------------------------------------------------------===// 00014 00015 #ifndef SPUHAZRECS_H 00016 #define SPUHAZRECS_H 00017 00018 #include "llvm/CodeGen/ScheduleHazardRecognizer.h" 00019 00020 namespace llvm { 00021 00022 class TargetInstrInfo; 00023 00024 /// SPUHazardRecognizer 00025 class SPUHazardRecognizer : public ScheduleHazardRecognizer 00026 { 00027 private: 00028 const TargetInstrInfo &TII; 00029 int EvenOdd; 00030 00031 public: 00032 SPUHazardRecognizer(const TargetInstrInfo &TII); 00033 virtual HazardType getHazardType(SUnit *SU); 00034 virtual void EmitInstruction(SUnit *SU); 00035 virtual void AdvanceCycle(); 00036 virtual void EmitNoop(); 00037 }; 00038 00039 } // end namespace llvm 00040 00041 #endif