summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-11-07 07:05:09 +0000
committerAndrew Trick <atrick@apple.com>2012-11-07 07:05:09 +0000
commit3b87f6204fe094610282eea4c8ad7ea4e331d8db (patch)
treecb770578550c82d96007f8a0f6525a10f9e17bf6 /include
parent881a05b46c28299046bd0dc3d0b8c6677e68a4d7 (diff)
downloadllvm-3b87f6204fe094610282eea4c8ad7ea4e331d8db.tar.gz
llvm-3b87f6204fe094610282eea4c8ad7ea4e331d8db.tar.bz2
llvm-3b87f6204fe094610282eea4c8ad7ea4e331d8db.tar.xz
misched: Heuristics based on the machine model.
misched is disabled by default. With -enable-misched, these heuristics balance the schedule to simultaneously avoid saturating processor resources, expose ILP, and minimize register pressure. I've been analyzing the performance of these heuristics on everything in the llvm test suite in addition to a few other benchmarks. I would like each heuristic check to be verified by a unit test, but I'm still trying to figure out the best way to do that. The heuristics are still in considerable flux, but as they are refined we should be rigorous about unit testing the improvements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineScheduler.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineScheduler.h b/include/llvm/CodeGen/MachineScheduler.h
index 2b96c7abe4..31bd606f93 100644
--- a/include/llvm/CodeGen/MachineScheduler.h
+++ b/include/llvm/CodeGen/MachineScheduler.h
@@ -154,6 +154,8 @@ public:
bool empty() const { return Queue.empty(); }
+ void clear() { Queue.clear(); }
+
unsigned size() const { return Queue.size(); }
typedef std::vector<SUnit*>::iterator iterator;
@@ -171,10 +173,12 @@ public:
SU->NodeQueueId |= ID;
}
- void remove(iterator I) {
+ iterator remove(iterator I) {
(*I)->NodeQueueId &= ~ID;
*I = Queue.back();
+ unsigned idx = I - Queue.begin();
Queue.pop_back();
+ return Queue.begin() + idx;
}
#ifndef NDEBUG
@@ -306,6 +310,9 @@ protected:
/// Reinsert debug_values recorded in ScheduleDAGInstrs::DbgValues.
void placeDebugValues();
+ /// \brief dump the scheduled Sequence.
+ void dumpSchedule() const;
+
// Lesser helpers...
void initRegPressure();