From 2c821cc06e0a94704ce4eef72d3ebfcb561ba1ff Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Thu, 10 Apr 2003 19:19:23 +0000 Subject: Fixed compilation errors, command-line argument declarations, cleaned up code to look nicer and removed useless stuff. Also renamed a few variables, moved them into namespaces, converted outputting to a file into a print to std::cerr with a DEBUG() guard, as all passes should do anyway. No functional changes have been made. However, this code now compiles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5769 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/ModuloScheduling/ModuloScheduling.h | 35 +++++++++++++++++-------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'lib/CodeGen/ModuloScheduling/ModuloScheduling.h') diff --git a/lib/CodeGen/ModuloScheduling/ModuloScheduling.h b/lib/CodeGen/ModuloScheduling/ModuloScheduling.h index 737a92c97d..87403cfe31 100644 --- a/lib/CodeGen/ModuloScheduling/ModuloScheduling.h +++ b/lib/CodeGen/ModuloScheduling/ModuloScheduling.h @@ -60,19 +60,32 @@ public: ~ModuloScheduling() {}; - ///the method to compute schedule and instert epilogue and prologue + // 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 printScheduleProcess() { + return DebugLevel >= DebugLevel_PrintScheduleProcess; + } + + // The method to compute schedule and instert epilogue and prologue void instrScheduling(); - ///debug functions: - ///dump the schedule and core schedule - void - dumpScheduling(); + // Debug functions: + // Dump the schedule and core schedule + void dumpScheduling(); - ///dump the input vector of nodes - //sch: the input vector of nodes - void dumpSchedule(std::vector> sch); + // Dump the input vector of nodes + // sch: the input vector of nodes + void dumpSchedule(std::vector > sch); - ///dump the resource usage table + // Dump the resource usage table void dumpResourceUsageTable(); //*******************internal functions******************************* @@ -94,13 +107,13 @@ private: // update the resource table at the startCycle // vec: the resouce usage // startCycle: the start cycle the resouce usage is - void updateResourceTable(std::vector> vec, + void updateResourceTable(std::vector > vec, int startCycle); // un-do the update in the resource table in the startCycle // vec: the resouce usage // startCycle: the start cycle the resouce usage is - void undoUpdateResourceTable(std::vector> vec, + void undoUpdateResourceTable(std::vector > vec, int startCycle); // return whether the resourcetable has negative element -- cgit v1.2.3-18-g5258