summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineScheduler.cpp
Commit message (Collapse)AuthorAge
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-19
| | | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195064 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r194865 and r194874.Alexey Samsonov2013-11-18
| | | | | | | | | | | | | This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194997 91177308-0d34-0410-b5e6-96231b3b80d8
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-15
| | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194865 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass LiveQueryResult by valueMatthias Braun2013-10-10
| | | | | | | This makes the API a bit more natural to use and makes it easier to make LiveRanges implementation details private. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192394 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment typo.Andrew Trick2013-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191312 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow subtarget selection of the default MachineScheduler and document the ↵Andrew Trick2013-09-20
| | | | | | | | | | | interface. The global registry is used to allow command line override of the scheduler selection, but does not work well as the normal selection API. For example, the same LLVM process should be able to target multiple targets or subtargets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191071 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ConvergingScheduler to GenericScheduler.Andrew Trick2013-09-19
| | | | | | | | | | This was an experimental scheduler a year ago. It's now used by several subtargets, both in-order and out-of-order, and it is about to be enabled by default for x86 and armv7. It will be the new GenericScheduler for subtargets that don't provide their own SchedulingStrategy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191051 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable -misched-cyclicpath by default.Andrew Trick2013-09-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190367 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: smooth out the cyclicpath heuristic.Andrew Trick2013-09-09
| | | | | | | | | | | | | | | Arnold's idea. I generally try to avoid stateful heuristics because it can make debugging harder. However, we need a way to prevent the latency priority from dominating, and it somewhat makes sense to schedule aggressively for latency only within an issue group. Swift in particular likes this, and it doesn't hurt anyone else: | Benchmarks/MiBench/consumer-lame | 10.39% | | Benchmarks/Misc/himenobmtxpa | 9.63% | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190360 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: cleanup register pressure update, remove a FIXME.Andrew Trick2013-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190181 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: improve regpressure tracing.Andrew Trick2013-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190180 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: print tree size in -view-misched-dagsAndrew Trick2013-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190179 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: register pressure update tracing.Andrew Trick2013-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190178 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: Reorder Cyclicpath (latency) and CriticalMax (pressure) heuristics.Andrew Trick2013-09-06
| | | | | | The latency based scheduling could induce spills in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190177 91177308-0d34-0410-b5e6-96231b3b80d8
* Added MachineSchedPolicy.Andrew Trick2013-09-06
| | | | | | | | Allow subtargets to customize the generic scheduling strategy. This is convenient for targets that don't need to add new heuristics by specializing the strategy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190176 91177308-0d34-0410-b5e6-96231b3b80d8
* mi-sched: Force bottom up scheduling for generic targets.Andrew Trick2013-09-04
| | | | | | | | | Fast register pressure tracking currently only takes effect during bottom up scheduling. Forcing this is a bit faster and simpler for targets that don't have many scheduling constraints and don't need top-down scheduling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190014 91177308-0d34-0410-b5e6-96231b3b80d8
* 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