1 //===-- SPUHazardRecognizers.cpp - Cell Hazard Recognizer Impls -----------===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by a team from the Computer Systems Research
6 // Department at The Aerospace Corporation.
8 // See README.txt for details.
10 //===----------------------------------------------------------------------===//
12 // This file implements hazard recognizers for scheduling on Cell SPU
15 //===----------------------------------------------------------------------===//
17 #define DEBUG_TYPE "sched"
19 #include "SPUHazardRecognizers.h"
21 #include "SPUInstrInfo.h"
22 #include "llvm/Support/Debug.h"
26 //===----------------------------------------------------------------------===//
27 // Cell SPU hazard recognizer
29 // This is the pipeline hazard recognizer for the Cell SPU processor. It does
30 // very little right now.
31 //===----------------------------------------------------------------------===//
33 SPUHazardRecognizer::SPUHazardRecognizer(const TargetInstrInfo &tii) :
39 /// Return the pipeline hazard type encountered or generated by this
40 /// instruction. Currently returns NoHazard.
43 HazardRecognizer::HazardType
44 SPUHazardRecognizer::getHazardType(SDNode *Node)
46 // Initial thoughts on how to do this, but this code cannot work unless the
47 // function's prolog and epilog code are also being scheduled so that we can
48 // accurately determine which pipeline is being scheduled.
50 HazardRecognizer::HazardType retval = NoHazard;
51 bool mustBeOdd = false;
53 switch (Node->getOpcode()) {
110 // Assume that this instruction can be on the even pipe
114 if (mustBeOdd && !EvenOdd)
117 DOUT << "SPUHazardRecognizer EvenOdd " << EvenOdd << " Hazard " << retval << "\n";
125 void SPUHazardRecognizer::EmitInstruction(SDNode *Node)
129 void SPUHazardRecognizer::AdvanceCycle()
131 DOUT << "SPUHazardRecognizer::AdvanceCycle\n";
134 void SPUHazardRecognizer::EmitNoop()