aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2003-04-10 19:19:23 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2003-04-10 19:19:23 +0000
commit2c821cc06e0a94704ce4eef72d3ebfcb561ba1ff (patch)
tree9beecc706fb2a94a1c61ed2362efdfcf59dcb770 /lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h
parent8baa01c1d79d8cff13634a48339cf551e30eaf14 (diff)
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
Diffstat (limited to 'lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h')
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h b/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h
index 737a92c97d..87403cfe31 100644
--- a/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h
+++ b/lib/Target/SparcV9/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<std::vector<ModuloSchedGraphNode*>> sch);
+ // Dump the input vector of nodes
+ // sch: the input vector of nodes
+ void dumpSchedule(std::vector<std::vector<ModuloSchedGraphNode*> > 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<std::vector<unsigned int>> vec,
+ void updateResourceTable(std::vector<std::vector<unsigned> > 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<vector<unsigned int>> vec,
+ void undoUpdateResourceTable(std::vector<std::vector<unsigned> > vec,
int startCycle);
// return whether the resourcetable has negative element