summaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/ScheduleDAG.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-03-14 04:00:41 +0000
committerAndrew Trick <atrick@apple.com>2012-03-14 04:00:41 +0000
commit17d35e57a585e869dc3084666abd17f173723735 (patch)
treed616f719f60e1bff75ab3c168bf8152b7d3ec422 /include/llvm/CodeGen/ScheduleDAG.h
parentcb058d51db44d47b57fc4705fea00209174d6577 (diff)
downloadexternal_llvm-17d35e57a585e869dc3084666abd17f173723735.zip
external_llvm-17d35e57a585e869dc3084666abd17f173723735.tar.gz
external_llvm-17d35e57a585e869dc3084666abd17f173723735.tar.bz2
misched: implemented a framework for top-down or bottom-up scheduling.
New flags: -misched-topdown, -misched-bottomup. They can be used with the default scheduler or with -misched=shuffle. Without either topdown/bottomup flag -misched=shuffle now alternates scheduling direction. LiveIntervals update is unimplemented with bottom-up scheduling, so only -misched-topdown currently works. Capped the ScheduleDAG hierarchy with a concrete ScheduleDAGMI class. ScheduleDAGMI is aware of the top and bottom of the unscheduled zone within the current region. Scheduling policy can be plugged into the ScheduleDAGMI driver by implementing MachineSchedStrategy. ConvergingScheduler is now the default scheduling algorithm. It exercises the new driver but still does no reordering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/ScheduleDAG.h')
-rw-r--r--include/llvm/CodeGen/ScheduleDAG.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h
index ef62685..f4de693 100644
--- a/include/llvm/CodeGen/ScheduleDAG.h
+++ b/include/llvm/CodeGen/ScheduleDAG.h
@@ -410,6 +410,13 @@ namespace llvm {
return false;
}
+ bool isTopReady() const {
+ return NumPredsLeft == 0;
+ }
+ bool isBottomReady() const {
+ return NumSuccsLeft == 0;
+ }
+
void dump(const ScheduleDAG *G) const;
void dumpAll(const ScheduleDAG *G) const;
void print(raw_ostream &O, const ScheduleDAG *G) const;