mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Debugging Utility - optional ability for dumping critical path length
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215153 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,6 +40,9 @@ cl::opt<bool> ForceTopDown("misched-topdown", cl::Hidden,
|
|||||||
cl::desc("Force top-down list scheduling"));
|
cl::desc("Force top-down list scheduling"));
|
||||||
cl::opt<bool> ForceBottomUp("misched-bottomup", cl::Hidden,
|
cl::opt<bool> ForceBottomUp("misched-bottomup", cl::Hidden,
|
||||||
cl::desc("Force bottom-up list scheduling"));
|
cl::desc("Force bottom-up list scheduling"));
|
||||||
|
cl::opt<bool>
|
||||||
|
DumpCriticalPathLength("misched-dcpl", cl::Hidden,
|
||||||
|
cl::desc("Print critical path length to stdout"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
@@ -451,6 +454,11 @@ void MachineSchedulerBase::scheduleRegions(ScheduleDAGInstrs &Scheduler) {
|
|||||||
else dbgs() << "End";
|
else dbgs() << "End";
|
||||||
dbgs() << " RegionInstrs: " << NumRegionInstrs
|
dbgs() << " RegionInstrs: " << NumRegionInstrs
|
||||||
<< " Remaining: " << RemainingInstrs << "\n");
|
<< " Remaining: " << RemainingInstrs << "\n");
|
||||||
|
if (DumpCriticalPathLength) {
|
||||||
|
errs() << MF->getName();
|
||||||
|
errs() << ":BB# " << MBB->getNumber();
|
||||||
|
errs() << " " << MBB->getName() << " \n";
|
||||||
|
}
|
||||||
|
|
||||||
// Schedule a region: possibly reorder instructions.
|
// Schedule a region: possibly reorder instructions.
|
||||||
// This invalidates 'RegionEnd' and 'I'.
|
// This invalidates 'RegionEnd' and 'I'.
|
||||||
@@ -2462,7 +2470,10 @@ void GenericScheduler::registerRoots() {
|
|||||||
if ((*I)->getDepth() > Rem.CriticalPath)
|
if ((*I)->getDepth() > Rem.CriticalPath)
|
||||||
Rem.CriticalPath = (*I)->getDepth();
|
Rem.CriticalPath = (*I)->getDepth();
|
||||||
}
|
}
|
||||||
DEBUG(dbgs() << "Critical Path: " << Rem.CriticalPath << '\n');
|
DEBUG(dbgs() << "Critical Path(GS-RR ): " << Rem.CriticalPath << '\n');
|
||||||
|
if (DumpCriticalPathLength) {
|
||||||
|
errs() << "Critical Path(GS-RR ): " << Rem.CriticalPath << " \n";
|
||||||
|
}
|
||||||
|
|
||||||
if (EnableCyclicPath) {
|
if (EnableCyclicPath) {
|
||||||
Rem.CyclicCritPath = DAG->computeCyclicCriticalPath();
|
Rem.CyclicCritPath = DAG->computeCyclicCriticalPath();
|
||||||
@@ -2905,7 +2916,10 @@ void PostGenericScheduler::registerRoots() {
|
|||||||
if ((*I)->getDepth() > Rem.CriticalPath)
|
if ((*I)->getDepth() > Rem.CriticalPath)
|
||||||
Rem.CriticalPath = (*I)->getDepth();
|
Rem.CriticalPath = (*I)->getDepth();
|
||||||
}
|
}
|
||||||
DEBUG(dbgs() << "Critical Path: " << Rem.CriticalPath << '\n');
|
DEBUG(dbgs() << "Critical Path: (PGS-RR) " << Rem.CriticalPath << '\n');
|
||||||
|
if (DumpCriticalPathLength) {
|
||||||
|
errs() << "Critical Path(PGS-RR ): " << Rem.CriticalPath << " \n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Apply a set of heursitics to a new candidate for PostRA scheduling.
|
/// Apply a set of heursitics to a new candidate for PostRA scheduling.
|
||||||
|
Reference in New Issue
Block a user