[llvm-commits] [llvm] r152699 - /llvm/trunk/lib/CodeGen/MachineScheduler.cpp

Andrew Trick atrick at apple.com
Tue Mar 13 21:00:38 PDT 2012


Author: atrick
Date: Tue Mar 13 23:00:38 2012
New Revision: 152699

URL: http://llvm.org/viewvc/llvm-project?rev=152699&view=rev
Log:
misched comments

Modified:
    llvm/trunk/lib/CodeGen/MachineScheduler.cpp

Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=152699&r1=152698&r2=152699&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Tue Mar 13 23:00:38 2012
@@ -113,6 +113,21 @@
 /// default scheduler if the target does not set a default.
 static ScheduleDAGInstrs *createCommonMachineSched(MachineSchedContext *C);
 
+/// Top-level MachineScheduler pass driver.
+///
+/// Visit blocks in function order. Divide each block into scheduling regions
+/// and visit them bottom-up. This is consistent with the DAG builder, which
+/// traverses scheduling regions bottom-up, but not essential.
+///
+/// This design avoids exposing scheduling boundaries to the DAG builder,
+/// simplifying the DAG builder's support for "special" target instructions,
+/// while at the same time allowing target schedulers to operate across
+/// scheduling boundaries, for example to bundle the boudary instructions
+/// without reordering them. This creates complexity, because the target
+/// scheduler must update the RegionBegin and RegionEnd positions cached by
+/// ScheduleDAGInstrs whenever adding or removing instructions. A much simpler
+/// design would be to split blocks at scheduling boundaries, but LLVM has a
+/// general bias against block splitting purely for implementation simplicity.
 bool MachineScheduler::runOnMachineFunction(MachineFunction &mf) {
   // Initialize the context of the pass.
   MF = &mf;





More information about the llvm-commits mailing list