summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineScheduler.cpp
Commit message (Collapse)AuthorAge
...
* comment typoAndrew Trick2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189997 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead subtree limit code.Andrew Trick2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189995 91177308-0d34-0410-b5e6-96231b3b80d8
* -view-misched-dags, better pruning.Andrew Trick2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189994 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: DEBUG cleanup, call tracePick for unidirectional scheduling.Andrew Trick2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189993 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 columnsAndrew Trick2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189992 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: Suppress register pressure tracking when the scheduling window is ↵Andrew Trick2013-09-04
| | | | | | | | | | too small. If the instruction window is < NumRegs/2, pressure tracking is not likely to be effective. The scheduler has to process a very large number of tiny blocks. We want this to be fast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189991 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: Load clustering is a bit to expensive to enable unconditionally.Andrew Trick2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189990 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: Reuse an invalid HazardRecognizer to save compile time.Andrew Trick2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189989 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: bypass heuristic checks when regpressure tracking is disabled.Andrew Trick2013-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189988 91177308-0d34-0410-b5e6-96231b3b80d8
* Added -misched-regpressure option.Andrew Trick2013-09-04
| | | | | | | | Register pressure tracking is half the complexity of the scheduler. It's useful to be able to turn it off for compile time and performance comparisons. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189987 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix my previous checkin to updatePressureDiffs.Andrew Trick2013-08-31
| | | | | | | | There was one case that we could hit a DebugValue where I didn't think to check. DebugValues are evil. No checkinable test case, sorry. It's an obvious fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189717 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: update PressureDiffs on-the-fly for liveness.Andrew Trick2013-08-30
| | | | | | | This removes all expensive pressure tracking logic from the scheduling critical path of node comparison. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189643 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: improve the generic register pressure comparison.Andrew Trick2013-08-30
| | | | | | | Only compare pressure within the same set. When multiple sets are affected, we prioritize the most constrained set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189641 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: Precompute a PressureDiff for each instruction, adjust for ↵Andrew Trick2013-08-30
| | | | | | | | | | | | | liveness later. Created SUPressureDiffs array to hold the per node PDiff computed during DAG building. Added a getUpwardPressureDelta API that will soon replace the old one. Compute PressureDelta here from the precomputed PressureDiffs. Updating for liveness will come next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189640 91177308-0d34-0410-b5e6-96231b3b80d8
* comment typoAndrew Trick2013-08-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189635 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment and revise the cyclic critical path code.Andrew Trick2013-08-29
| | | | | | This should be much more clear now. It's still disabled pending testing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189597 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds cyclic critical path computation and heuristics, temporarily disabled.Andrew Trick2013-08-23
| | | | | | | | | | | Estimate the cyclic critical path within a single block loop. If the acyclic critical path is longer, then the loop will exhaust OOO resources after some number of iterations. If lag between the acyclic critical path and cyclic critical path is longer the the time it takes to issue those loop iterations, then aggressively schedule for latency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189120 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: Don't call MBB.size() in initSUnits. The driver already has instr ↵Andrew Trick2013-08-23
| | | | | | | | | count. This fixes a pathological compile time problem with very large blocks and lots of scheduling boundaries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189116 91177308-0d34-0410-b5e6-96231b3b80d8
* Confusing comment typo.Andrew Trick2013-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187895 91177308-0d34-0410-b5e6-96231b3b80d8
* MI Sched: Track live-thru registers.Andrew Trick2013-07-30
| | | | | | | | | | | When registers must be live throughout the scheduling region, increase the limit for the register class. Once we exceed the original limit, they will be spilled, and there's no point further reducing pressure. This isn't a perfect heuristics but avoids a situation where the scheduler could become trapped by trying to achieve the impossible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187436 91177308-0d34-0410-b5e6-96231b3b80d8
* MI Sched fix: assert "Disconnected LRG within the scheduling region."Andrew Trick2013-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187435 91177308-0d34-0410-b5e6-96231b3b80d8
* MI Sched: Register pressure heuristics.Andrew Trick2013-07-25
| | | | | | Consider which set is being increased or decreased before comparing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187110 91177308-0d34-0410-b5e6-96231b3b80d8
* Dump LIS before regalloc. MI sched changes them.Andrew Trick2013-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187107 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix uninitialized memory read found by MemorySanitizer: always set output ↵Alexey Samsonov2013-07-19
| | | | | | parameter of ConvergingScheduler::SchedBoundary::getOtherResourceCount git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186658 91177308-0d34-0410-b5e6-96231b3b80d8
* MI Sched: Update the way resources are tracked so the current heuristics ↵Andrew Trick2013-07-19
| | | | | | make more sense. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186632 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: cleanup DEBUG output.Andrew Trick2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184565 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: Adjust regpressure limits for reserved regs.Andrew Trick2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184564 91177308-0d34-0410-b5e6-96231b3b80d8
* Give RegMax higher priority.Andrew Trick2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184133 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove compareRPDelta.Andrew Trick2013-06-17
| | | | | | A complex, expensive heuristic with little value in the current design. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184132 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: Remove another heuristic that is sensitive to queue order.Andrew Trick2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184130 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: Track multiple candidates with the same priority level.Andrew Trick2013-06-17
| | | | | | | | This eliminates the MultiPressure scheduling "reason". It was sensitive to queue order. We don't like being sensitive to queue order. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184129 91177308-0d34-0410-b5e6-96231b3b80d8
* Missing NDEBUGs.Andrew Trick2013-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184039 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: heuristics using the new latency and machine model.Andrew Trick2013-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184038 91177308-0d34-0410-b5e6-96231b3b80d8
* Machine Model: Add MicroOpBufferSize and resource BufferSize.Andrew Trick2013-06-15
| | | | | | | | | | | | | Replace the ill-defined MinLatency and ILPWindow properties with with straightforward buffer sizes: MCSchedMode::MicroOpBufferSize MCProcResourceDesc::BufferSize These can be used to more precisely model instruction execution if desired. Disabled some misched tests temporarily. They'll be reenabled in a few commits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184032 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: Rename IssueCount to CurrMOps.Andrew Trick2013-06-15
| | | | | | | "Counts" refer to scaled resource counts within a region. CurrMOps is simply the number of micro-ops to be issue in the current cycle. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184031 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: Remove the temporary EnableCopyConstrain flag.Andrew Trick2013-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184030 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: added tracking of dependent latency for better heuristics.Andrew Trick2013-06-15
| | | | | | | | | | | | | | Heuristics compare the critical path in the scheduled code, called ExpectedLatency, with the latency of instructions remaining to be scheduled. There are two ways to look at remaining latency: (1) Dependent latency includes the latency between unscheduled and scheduled instructions. (2) Independent latency is simply the height (bottom-up) or depth (top-down) of instructions currently in the ready Q. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184029 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: DEBUG: print critical resource.Andrew Trick2013-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184028 91177308-0d34-0410-b5e6-96231b3b80d8
* Move #include from .h to .cpp file.Jakub Staszak2013-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183960 91177308-0d34-0410-b5e6-96231b3b80d8
* MI Sched: revert a minor heuristic that snuck in with -misched-vcopy.Andrew Trick2013-04-30
| | | | | | I'll fix the heuristic in a general way in a follow-up commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180815 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for r180193 - MI Sched: eliminate local vreg.Andrew Trick2013-04-24
| | | | | | | | | Fixes PR15838. Need to check for blocks with nothing but dbg.value. I'm not sure how to force this situation with a unit test. I tried to reduce the test case in PR15838 (1k lines of metadata) but gave up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180227 91177308-0d34-0410-b5e6-96231b3b80d8
* MI Sched: eliminate local vreg copies.Andrew Trick2013-04-24
| | | | | | | | | | | | | | | | For now, we just reschedule instructions that use the copied vregs and let regalloc elliminate it. I would really like to eliminate the copies on-the-fly during scheduling, but we need a complete implementation of repairIntervalsInRange() first. The general strategy is for the register coalescer to eliminate as many global copies as possible and shrink live ranges to be extended-basic-block local. The coalescer should not have to worry about resolving local copies (e.g. it shouldn't attemp to reorder instructions). The scheduler is a much better place to deal with local interference. The coalescer side of this equation needs work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180193 91177308-0d34-0410-b5e6-96231b3b80d8
* MI Sched: regpressure tracing.Andrew Trick2013-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180191 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: DEBUG formatting.Andrew Trick2013-04-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179452 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: schedule physreg copies.Andrew Trick2013-04-13
| | | | | | | | | | | The register allocator expects minimal physreg live ranges. Schedule physreg copies accordingly. This is slightly tricky when they occur in the middle of the scheduling region. For now, this is handled by rescheduling the copy when its associated instruction is scheduled. Eventually we may instead bundle them, but only if we can preserve the bundles as parallel copies during regalloc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179449 91177308-0d34-0410-b5e6-96231b3b80d8
* RegisterPressure heuristics currently require signed comparisons.Andrew Trick2013-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178823 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable DFSResult for ConvergingScheduler.Andrew Trick2013-04-05
| | | | | | | | For now, just save the compile time since the ConvergingScheduler heuristics don't use this analysis. We'll probably enable it later after compile-time investigation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178822 91177308-0d34-0410-b5e6-96231b3b80d8
* MachineScheduler: format DEBUG output.Andrew Trick2013-04-05
| | | | | | | I'm getting more serious about tuning and enabling on x86/ARM. Start by making the trace readable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178821 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix missing std::. Not sure how this compiles for anyone else.Matt Arsenault2013-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177620 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup #includes.Jakub Staszak2013-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176787 91177308-0d34-0410-b5e6-96231b3b80d8