forked from OSchip/llvm-project
parent
2618272dad
commit
856ee9154f
|
@ -35,19 +35,19 @@
|
||||||
// see ModuloSchedulingPass::runOnFunction()
|
// see ModuloSchedulingPass::runOnFunction()
|
||||||
//************************************************************
|
//************************************************************
|
||||||
|
|
||||||
namespace {
|
ModuloSchedDebugLevel_t ModuloSchedDebugLevel;
|
||||||
cl::opt<ModuloScheduling::DebugLevel_t,true>
|
|
||||||
SDL_opt("modsched", cl::Hidden, cl::location(ModuloScheduling::DebugLevel),
|
cl::opt<ModuloSchedDebugLevel_t,true>
|
||||||
|
SDL_opt("modsched", cl::Hidden, cl::location(ModuloSchedDebugLevel),
|
||||||
cl::desc("enable modulo scheduling debugging information"),
|
cl::desc("enable modulo scheduling debugging information"),
|
||||||
cl::values(clEnumValN(ModuloScheduling::DebugLevel_NoDebugInfo,
|
cl::values(clEnumValN(ModuloSchedDebugLevel_NoDebugInfo,
|
||||||
"none", "disable debug output"),
|
"none", "disable debug output"),
|
||||||
clEnumValN(ModuloScheduling::DebugLevel_PrintSchedule,
|
clEnumValN(ModuloSchedDebugLevel_PrintSchedule,
|
||||||
"psched", "print original and new schedule"),
|
"psched", "print original and new schedule"),
|
||||||
clEnumValN(ModuloScheduling::DebugLevel_PrintScheduleProcess,
|
clEnumValN(ModuloSchedDebugLevel_PrintScheduleProcess,
|
||||||
"pschedproc",
|
"pschedproc",
|
||||||
"print how the new schdule is produced"),
|
"print how the new schdule is produced"),
|
||||||
0));
|
0));
|
||||||
}
|
|
||||||
|
|
||||||
// Computes the schedule and inserts epilogue and prologue
|
// Computes the schedule and inserts epilogue and prologue
|
||||||
//
|
//
|
||||||
|
|
|
@ -13,6 +13,13 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
// for debug information selecton
|
||||||
|
enum ModuloSchedDebugLevel_t {
|
||||||
|
ModuloSchedDebugLevel_NoDebugInfo,
|
||||||
|
ModuloSchedDebugLevel_PrintSchedule,
|
||||||
|
ModuloSchedDebugLevel_PrintScheduleProcess,
|
||||||
|
};
|
||||||
|
|
||||||
class ModuloScheduling: NonCopyable {
|
class ModuloScheduling: NonCopyable {
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -48,6 +55,10 @@ private:
|
||||||
typedef BasicBlock::InstListType InstListType;
|
typedef BasicBlock::InstListType InstListType;
|
||||||
typedef std::vector<std::vector<ModuloSchedGraphNode*> > vvNodeType;
|
typedef std::vector<std::vector<ModuloSchedGraphNode*> > vvNodeType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ModuloScheduling(ModuloSchedGraph & _graph):
|
ModuloScheduling(ModuloSchedGraph & _graph):
|
||||||
|
@ -60,18 +71,23 @@ public:
|
||||||
|
|
||||||
~ModuloScheduling() {};
|
~ModuloScheduling() {};
|
||||||
|
|
||||||
// for debug information selecton
|
|
||||||
enum DebugLevel_t {
|
|
||||||
DebugLevel_NoDebugInfo,
|
|
||||||
DebugLevel_PrintSchedule,
|
|
||||||
DebugLevel_PrintScheduleProcess,
|
|
||||||
};
|
|
||||||
|
|
||||||
static DebugLevel_t DebugLevel;
|
|
||||||
|
|
||||||
static bool printSchedule() { return DebugLevel >= DebugLevel_PrintSchedule; }
|
static bool
|
||||||
static bool printScheduleProcess() {
|
printSchedule() {
|
||||||
return DebugLevel >= DebugLevel_PrintScheduleProcess;
|
|
||||||
|
//return ModuloScheduling::DebugLevel >= DebugLevel_PrintSchedule;
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
static bool
|
||||||
|
printScheduleProcess() {
|
||||||
|
|
||||||
|
//return DebugLevel >= DebugLevel_PrintScheduleProcess;
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The method to compute schedule and instert epilogue and prologue
|
// The method to compute schedule and instert epilogue and prologue
|
||||||
|
|
Loading…
Reference in New Issue