misched: Add finalizeScheduler to complete the target interface.
llvm-svn: 153827
diff --git a/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h b/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h
index a08f6cc..c8de7bc 100644
--- a/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h
+++ b/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h
@@ -296,6 +296,10 @@
/// overriding enterRegion() or exitRegion().
virtual void schedule() = 0;
+ /// finalizeSchedule - Allow targets to perform final scheduling actions at
+ /// the level of the whole MachineFunction. By default does nothing.
+ virtual void finalizeSchedule() {}
+
virtual void dumpNode(const SUnit *SU) const;
/// Return a label for a DAG node that points to an instruction.
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index 364a244..1d3241b 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -227,6 +227,7 @@
assert(RemainingCount == 0 && "Instruction count mismatch!");
Scheduler->finishBlock();
}
+ Scheduler->finalizeSchedule();
DEBUG(LIS->print(dbgs()));
return true;
}