diff options
author | Andrew Trick <atrick@apple.com> | 2012-03-14 04:00:38 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-03-14 04:00:38 +0000 |
commit | cb058d51db44d47b57fc4705fea00209174d6577 (patch) | |
tree | d89e9ba1b973d345461070e0fd8c6992e21b77c9 | |
parent | fc7e9ef23941e8a9ab3055e9f50ac4704b6d24a2 (diff) | |
download | external_llvm-cb058d51db44d47b57fc4705fea00209174d6577.zip external_llvm-cb058d51db44d47b57fc4705fea00209174d6577.tar.gz external_llvm-cb058d51db44d47b57fc4705fea00209174d6577.tar.bz2 |
misched comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152699 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/MachineScheduler.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineScheduler.cpp b/lib/CodeGen/MachineScheduler.cpp index 8b70ae5..bb4b89f 100644 --- a/lib/CodeGen/MachineScheduler.cpp +++ b/lib/CodeGen/MachineScheduler.cpp @@ -113,6 +113,21 @@ SchedDefaultRegistry("default", "Use the target's default scheduler choice.", /// 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; |