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 | 72515bef32d5e17a3fccc9cf4f06bc39d91ee4c6 (patch) | |
tree | 6660c27c121b8d9d4bda848fb7639c23777098c2 /llvm/lib/CodeGen/MachineScheduler.cpp | |
parent | d64afba584c9622f777f1b9910007b28e6c04da6 (diff) | |
download | bcm5719-llvm-72515bef32d5e17a3fccc9cf4f06bc39d91ee4c6.tar.gz bcm5719-llvm-72515bef32d5e17a3fccc9cf4f06bc39d91ee4c6.zip |
misched comments
llvm-svn: 152699
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 8b70ae5350d..bb4b89fd7fa 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/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; |