summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Factor out more code for computing register live-range informationforDan Gohman2009-02-101-12/+23
| | | | | | | | | | | scheduling, and generalize is so that preserves state across scheduling regions. This fixes incorrect live-range information around terminators and labels, which are effective region boundaries. In place of looking for terminators to anchor inter-block dependencies, introduce special entry and exit scheduling units for this purpose. llvm-svn: 64254
* Move ScheduleDAGSDNodes.h to be a private header. Front-endsDan Gohman2009-02-061-1/+1
| | | | | | | that previously included this header should include SchedulerRegistry.h instead. llvm-svn: 63937
* Move a few containers out of ScheduleDAGInstrs::BuildSchedGraphDan Gohman2009-01-151-9/+5
| | | | | | | | | | | and into the ScheduleDAGInstrs class, so that they don't get destructed and re-constructed for each block. This fixes a compile-time hot spot in the post-pass scheduler. To help facilitate this, tidy and do some minor reorganization in the scheduler constructor functions. llvm-svn: 62275
* Fix PR3241: Currently EmitCopyFromReg emits a copy from the physical ↵Evan Cheng2009-01-121-22/+24
| | | | | | | | register to a virtual register unless it requires an expensive cross class copy. That means we are only treating "expensive to copy" register dependency as physical register dependency. Also future proof the scheduler to handle "normal" physical register dependencies. The code is not exercised yet. llvm-svn: 62074
* Rename BuildSchedUnits to BuildSchedGraph, and refactor theDan Gohman2008-12-231-2/+2
| | | | | | code in ScheduleDAGSDNodes' BuildSchedGraph into separate functions. llvm-svn: 61376
* Fix some register-alias-related bugs in the post-RA scheduler livenessDan Gohman2008-12-161-12/+7
| | | | | | | | | | | | | | computation code. Also, avoid adding output-depenency edges when both defs are dead, which frequently happens with EFLAGS defs. Compute Depth and Height lazily, and always in terms of edge latency values. For the schedulers that don't care about latency, edge latencies are set to 1. Eliminate Cycle and CycleBound, and LatencyPriorityQueue's Latencies array. These are all subsumed by the Depth and Height fields. llvm-svn: 61073
* Make addPred and removePred return void, since the return value is notDan Gohman2008-12-161-4/+4
| | | | | | currently used by anything. llvm-svn: 61066
* Rewrite the SDep class, and simplify some of the related code.Dan Gohman2008-12-091-91/+89
| | | | | | | | | | | | | | | | | The Cost field is removed. It was only being used in a very limited way, to indicate when the scheduler should attempt to protect a live register, and it isn't really needed to do that. If we ever want the scheduler to start inserting copies in non-prohibitive situations, we'll have to rethink some things anyway. A Latency field is added. Instead of giving each node a single fixed latency, each edge can have its own latency. This will eventually be used to model various micro-architecture properties more accurately. The PointerIntPair class and an internal union are now used, which reduce the overall size. llvm-svn: 60806
* Check in the rest of this change. The isAntiDep flag needs to be passedDan Gohman2008-11-241-1/+1
| | | | | | | to removePred because an SUnit can both data-depend and anti-depend on the same SUnit. llvm-svn: 59969
* Add a flag to SDep for tracking which edges are anti-dependence edges.Dan Gohman2008-11-211-4/+4
| | | | llvm-svn: 59785
* Rename SDep's isSpecial to isArtificial, to make this field a littleDan Gohman2008-11-211-20/+20
| | | | | | less mysterious. llvm-svn: 59782
* Change these schedulers to not emit no-ops. It turns out thatDan Gohman2008-11-211-3/+1
| | | | | | | | | the RR scheduler actually does look at latency values, but it doesn't use a hazard recognizer so it has no way to know when a no-op is needed, as opposed to just stalling and incrementing the cycle count. llvm-svn: 59759
* Simplify this code a little. In the fast scheduler, CreateNewSUnitDan Gohman2008-11-191-17/+5
| | | | | | and CreateClone don't add any extra value. llvm-svn: 59679
* Experimental post-pass scheduling support. Post-pass schedulingDan Gohman2008-11-191-3/+3
| | | | | | | | | | | | | | | | | is currently off by default, and can be enabled with -disable-post-RA-scheduler=false. This doesn't have a significant impact on most code yet because it doesn't yet do anything to address anti-dependencies and it doesn't attempt to disambiguate memory references. Also, several popular targets don't have pipeline descriptions yet. The majority of the changes here are splitting the SelectionDAG-specific code out of ScheduleDAG, so that ScheduleDAG can be moved to libLLVMCodeGen.a. The interface between ScheduleDAG-using code and the rest of the scheduling code is somewhat rough and will evolve. llvm-svn: 59676
* Tidy up ScheduleNodeBottomUp methods, and make them moreDan Gohman2008-11-181-3/+3
| | | | | | consistent with ScheduleNodeTopDown methods. llvm-svn: 59550
* Change SUnit's dump method to take a ScheduleDAG* instead ofDan Gohman2008-11-181-5/+5
| | | | | | a SelectionDAG*. llvm-svn: 59488
* Avoid using a loop in ReleasePred and ReleaseSucc methods to compute theDan Gohman2008-11-181-5/+4
| | | | | | | | | | | | | new CycleBound value. Instead, just update CycleBound on each call. Also, make ReleasePred and ReleaseSucc methods more consistent accross the various schedulers. This also happens to make ScheduleDAGRRList's CycleBound computation somewhat more interesting, though it still doesn't have any noticeable effect, because no current targets that use the register-pressure reduction scheduler provide pipeline models. llvm-svn: 59475
* Don't bother doing latency calculations in the "fast" scheduler.Dan Gohman2008-11-171-15/+5
| | | | llvm-svn: 59461
* Remove the FlaggedNodes member from SUnit. Instead of requiring each SUnitDan Gohman2008-11-131-4/+3
| | | | | | | | | | to carry a SmallVector of flagged nodes, just calculate the flagged nodes dynamically when they are needed. The local-liveness change is due to a trivial scheduling change where the scheduler arbitrary decision differently. llvm-svn: 59273
* Make the Node member of SUnit private, and add accessors.Dan Gohman2008-11-131-7/+7
| | | | llvm-svn: 59264
* Change ScheduleDAG's DAG member from a reference to a pointer, to prepareDan Gohman2008-11-131-12/+12
| | | | | | for the possibility of scheduling without a SelectionDAG being present. llvm-svn: 59263
* Change the scheduler accessor methods to accept an explicit TargetMachineDan Gohman2008-11-111-1/+2
| | | | | | | argument instead of taking the SelectionDAG's TargetMachine. This is needed for some upcoming scheduler changes. llvm-svn: 59055
* Fix command-line option printing to print two spaces where needed,Dan Gohman2008-10-141-1/+1
| | | | | | | | | instead of requiring all "short description" strings to begin with two spaces. This makes these strings less mysterious, and it fixes some cases where short description strings mistakenly did not begin with two spaces. llvm-svn: 57521
* Replace the LiveRegs SmallSet with a simple counter that keepsDan Gohman2008-09-231-10/+13
| | | | | | | track of the number of live registers, which is all the set was being used for. llvm-svn: 56498
* Add a new "fast" scheduler. This is currently basically just aDan Gohman2008-09-181-0/+654
copy of the BURRList scheduler, but with several parts ripped out, such as backtracking, online topological sort maintenance (needed by backtracking), the priority queue, and Sethi-Ullman number computation and maintenance (needed by the priority queue). As a result of all this, it generates somewhat lower quality code, but that's its tradeoff for running about 30% faster than list-burr in -fast mode in many cases. This is somewhat experimental. Moving forward, major pieces of this can be refactored with pieces in common with ScheduleDAGRRList.cpp. llvm-svn: 56307
OpenPOWER on IntegriCloud