summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PostRASchedulerList.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move getInstrOperandRegClass from the scheduler to TargetInstrInfo.Evan Cheng2009-05-051-12/+0
| | | | llvm-svn: 70950
* Fix pr3954. The register scavenger asserts for inline assembly withBob Wilson2009-04-091-1/+1
| | | | | | | | | | | | register destinations that are tied to source operands. The TargetInstrDescr::findTiedToSrcOperand method silently fails for inline assembly. The existing MachineInstr::isRegReDefinedByTwoAddr was very close to doing what is needed, so this revision makes a few changes to that method and also renames it to isRegTiedToUseOperand (for consistency with the very similar isRegTiedToDefOperand and because it handles both two-address instructions and inline assembly with tied registers). llvm-svn: 68714
* Add parentheses to pacify gcc-4.3.Duncan Sands2009-03-111-1/+1
| | | | llvm-svn: 66653
* Fix a post-RA scheduling liveness bug. When a basic block is beingDan Gohman2009-03-101-9/+22
| | | | | | | | | | | | | scheduled in multiple regions, liveness data used by the anti-dependence breaker is carried from one region to the next, however the information reflects the state of the instructions before scheduling. After scheduling, there may be new live range overlaps. Handle this by pessimizing the liveness data carried between regions to the point where it will be conservatively correct now matter how the earlier region is scheduled. This fixes a miscompilation in 176.gcc with the post-RA scheduler enabled. llvm-svn: 66558
* When scheduling a block in parts, keep track of the overallDan Gohman2009-02-111-10/+28
| | | | | | | | | | | instruction index across each part. Instruction indices are used to make live range queries, and live ranges can extend beyond scheduling region boundaries. Refactor the ScheduleDAGSDNodes class some more so that it doesn't have to worry about this additional information. llvm-svn: 64288
* Consider any instruction that modifies the stack pointer to beDan Gohman2009-02-101-0/+10
| | | | | | | | | a scheduling region boundary. This isn't necessary for correctness; it helps with compile time, as it avoids the need for data- and anti-dependencies from all spills and reloads on the stack-pointer modification. llvm-svn: 64255
* Factor out more code for computing register live-range informationforDan Gohman2009-02-101-191/+292
| | | | | | | | | | | 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 getPointerRegClass from TargetInstrInfo to TargetRegisterInfo.Evan Cheng2009-02-061-5/+4
| | | | llvm-svn: 63938
* Move ScheduleDAGInstrs.h to be a private header. Front-endsDan Gohman2009-02-061-1/+1
| | | | | | | | that used this header to select a scheduling policy should use SchedulerRegistry.h instead (llvm-gcc and clang were updated a while ago). llvm-svn: 63934
* Change the post-RA scheduler to iterate through theDan Gohman2009-02-031-9/+11
| | | | | | | | basic-block segments bottom-up instead of top down. This is the first step in a general restructuring of the way register liveness is tracked in the post-RA scheduler. llvm-svn: 63643
* Instead of adding dependence edges between terminator instructionsDan Gohman2009-01-161-2/+10
| | | | | | | | | | | | | | and every other instruction in their blocks to keep the terminator instructions at the end, teach the post-RA scheduler how to operate on ranges of instructions, and exclude terminators from the range of instructions that get scheduled. Also, exclude mid-block labels, such as EH_LABEL instructions, and schedule code before them separately from code after them. This fixes problems with the post-RA scheduler moving code past EH_LABELs. llvm-svn: 62366
* If an anti-dependence uses a non-allocatable register, set AntiDepRegDan Gohman2009-01-161-1/+3
| | | | | | | to 0, to ensure that the subsequent code doesn't try to break the dependence. llvm-svn: 62365
* Fix the check for an empty basic block to check for an empty SUnitsDan Gohman2009-01-161-2/+2
| | | | | | | | array instead, since this is what the scheduler actually cares about. And remove a check that is unnecessary, since it can assume that SUnits isn't empty. llvm-svn: 62362
* Fix a "comparison between signed and unsigned integer expressions"Dan Gohman2009-01-161-1/+1
| | | | | | warning. llvm-svn: 62327
* Initial hazard recognizer support in post-pass scheduling. This includesDan Gohman2009-01-161-8/+119
| | | | | | | a new toy hazard recognizier heuristic which attempts to direct the scheduler to avoid clumping large groups of loads or stores too densely. llvm-svn: 62291
* Move a few containers out of ScheduleDAGInstrs::BuildSchedGraphDan Gohman2009-01-151-11/+14
| | | | | | | | | | | 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
* Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman2009-01-051-3/+0
| | | | llvm-svn: 61715
* Rename BuildSchedUnits to BuildSchedGraph, and refactor theDan Gohman2008-12-231-3/+3
| | | | | | code in ScheduleDAGSDNodes' BuildSchedGraph into separate functions. llvm-svn: 61376
* Use ~0u instead of -1u as the special value, to hopefully avoidDan Gohman2008-12-191-20/+20
| | | | | | warnings on compilers that warn about such things. llvm-svn: 61263
* Eliminate the loop that walks the critical path. Instead, just track theDan Gohman2008-12-161-54/+64
| | | | | | | position in the critical path during the main instruction walk. This eliminates the need for the CritialAntiDep DenseMap. llvm-svn: 61096
* Enable anti-dependence breaking by default when post-RA scheduling is enabled.Dan Gohman2008-12-161-1/+1
| | | | llvm-svn: 61078
* When breaking an anti-dependency, don't use a register which has seenDan Gohman2008-12-161-0/+1
| | | | | | | one of its aliases defined. This is conservative, but tricky subreg corner cases are outside the primary aim of this pass. llvm-svn: 61077
* Fix some register-alias-related bugs in the post-RA scheduler livenessDan Gohman2008-12-161-37/+61
| | | | | | | | | | | | | | 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
* Rewrite the SDep class, and simplify some of the related code.Dan Gohman2008-12-091-22/+17
| | | | | | | | | | | | | | | | | 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
* Drop the reg argument to isRegReDefinedByTwoAddr, which was redundant.Dan Gohman2008-12-051-1/+1
| | | | llvm-svn: 60586
* Ignore IMPLICIT_DEF instructions when computing physreg liveness.Dan Gohman2008-12-051-0/+7
| | | | | | | | | | While they appear to provide a normal clobbering def, they don't in the case of the awkward IMPLICIT_DEF+INSERT_SUBREG idiom. It would be good to change INSERT_SUBREG; until then, this change allows post-regalloc scheduling to cope in a mildly conservative way. llvm-svn: 60583
* Use register names instead of numbers in debug output.Dan Gohman2008-12-041-2/+3
| | | | llvm-svn: 60525
* Rewrite the liveness bookkeeping code to fix a bunch ofDan Gohman2008-12-031-34/+42
| | | | | | issues with subreg operands and tied operands. llvm-svn: 60510
* Fix an inconsistency in a comment.Dan Gohman2008-12-031-4/+3
| | | | llvm-svn: 60500
* Don't charge the full latency for anti and output dependencies. This isDan Gohman2008-12-031-3/+6
| | | | | | | an area where eventually it would be good to use target-dependent information. llvm-svn: 60498
* When looking for anti-dependences on the critical path, don't botherDan Gohman2008-12-031-0/+4
| | | | | | examining non-anti-dependence edges. llvm-svn: 60496
* Add a comment about callee-saved registers.Dan Gohman2008-12-031-0/+2
| | | | llvm-svn: 60495
* Silence a warning.Nick Lewycky2008-11-271-1/+1
| | | | | | | Despite changing the order of evaluation, this doesn't actually change the meaning of the statement. llvm-svn: 60177
* Suppress warnings.Dan Gohman2008-11-251-7/+7
| | | | llvm-svn: 60041
* Initial support for anti-dependence breaking. Currently this code does notDan Gohman2008-11-251-23/+416
| | | | | | | | | introduce any new spilling; it just uses unused registers. Refactor the SUnit topological sort code out of the RRList scheduler and make use of it to help with the post-pass scheduler. llvm-svn: 59999
* Factor out the code for verifying the work of the scheduler,Dan Gohman2008-11-201-12/+1
| | | | | | | extend it a bit, and make use of it in all schedulers, to ensure consistent checking. llvm-svn: 59689
* Experimental post-pass scheduling support. Post-pass schedulingDan Gohman2008-11-191-8/+195
| | | | | | | | | | | | | | | | | 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 several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* don't create the post-ra scheduler unless it is enabled.Chris Lattner2008-01-141-16/+1
| | | | llvm-svn: 45972
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Modify previous patch per review comments.Dale Johannesen2007-07-131-1/+1
| | | | llvm-svn: 39817
* Skeleton of post-RA scheduler; doesn't do anything yet.Dale Johannesen2007-07-131-0/+81
Change name of -sched option and DEBUG_TYPE to pre-RA-sched; adjust testcases. llvm-svn: 39816
OpenPOWER on IntegriCloud