summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't advance the hazard recognizer when there are no hazards and no ↵Chris Lattner2006-03-121-25/+40
| | | | | | | | | | | instructions to be emitted. Don't add one to the latency of a completed instruction if the latency of the op is 0. llvm-svn: 26718
* Chain operands aren't real uses: they don't require the full latency of theChris Lattner2006-03-121-4/+10
| | | | | | predecessor to finish before they can start. llvm-svn: 26717
* As a pending queue data structure to keep track of instructions whoseChris Lattner2006-03-121-36/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operands have all issued, but whose results are not yet available. This allows us to compile: int G; int test(int A, int B, int* P) { return (G+A)*(B+1); } to: _test: lis r2, ha16(L_G$non_lazy_ptr) addi r4, r4, 1 lwz r2, lo16(L_G$non_lazy_ptr)(r2) lwz r2, 0(r2) add r2, r2, r3 mullw r3, r2, r4 blr instead of this, which has a stall between the lis/lwz: _test: lis r2, ha16(L_G$non_lazy_ptr) lwz r2, lo16(L_G$non_lazy_ptr)(r2) addi r4, r4, 1 lwz r2, 0(r2) add r2, r2, r3 mullw r3, r2, r4 blr llvm-svn: 26716
* rename priorityqueue -> availablequeue. When a node is scheduled, rememberChris Lattner2006-03-111-34/+37
| | | | | | which cycle it lands on. llvm-svn: 26714
* Make CurrCycle a local var instead of an instance varChris Lattner2006-03-111-19/+20
| | | | llvm-svn: 26713
* Move some methods around so that BU specific code is together, TD specific codeChris Lattner2006-03-111-236/+245
| | | | | | is together, and direction independent code is together. llvm-svn: 26712
* merge preds/chainpreds -> preds setChris Lattner2006-03-111-93/+61
| | | | | | | | | merge succs/chainsuccs -> succs set This has no functionality change, simplifies the code, and reduces the size of sunits. llvm-svn: 26711
* Move some simple-sched-specific instance vars to the simple scheduler.Chris Lattner2006-03-101-1/+1
| | | | llvm-svn: 26690
* Make EmitNode take a SDNode instead of a NodeInfo*Chris Lattner2006-03-101-8/+3
| | | | llvm-svn: 26687
* Move the VRBase field from NodeInfo to being a separate, explicit, map.Chris Lattner2006-03-101-2/+3
| | | | llvm-svn: 26686
* no need to build groups anymoreChris Lattner2006-03-101-2/+0
| | | | llvm-svn: 26684
* Create SUnits directly from the SelectionDAG.Chris Lattner2006-03-101-87/+87
| | | | llvm-svn: 26683
* Push PrepareNodeInfo/IdentifyGroups down the inheritance hierarchyChris Lattner2006-03-101-0/+5
| | | | llvm-svn: 26682
* Teach the latency scheduler some new tricks. In particular, to break ties,Chris Lattner2006-03-101-9/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keep track of a sense of "mobility", i.e. how many other nodes scheduling one node will free up. For something like this: float testadd(float *X, float *Y, float *Z, float *W, float *V) { return (*X+*Y)*(*Z+*W)+*V; } For example, this makes us schedule *X then *Y, not *X then *Z. The former allows us to issue the add, the later only lets us issue other loads. This turns the above code from this: _testadd: lfs f0, 0(r3) lfs f1, 0(r6) lfs f2, 0(r4) lfs f3, 0(r5) fadds f0, f0, f2 fadds f1, f3, f1 lfs f2, 0(r7) fmadds f1, f0, f1, f2 blr into this: _testadd: lfs f0, 0(r6) lfs f1, 0(r5) fadds f0, f1, f0 lfs f1, 0(r4) lfs f2, 0(r3) fadds f1, f2, f1 lfs f2, 0(r7) fmadds f1, f1, f0, f2 blr llvm-svn: 26680
* add an aggregate method for reinserting scheduled nodes, add a callback forChris Lattner2006-03-101-8/+23
| | | | | | priority impls that want to be notified when a node is scheduled llvm-svn: 26678
* Fix VC++ build breakage.Jeff Cohen2006-03-101-3/+3
| | | | llvm-svn: 26676
* remove temporary optionChris Lattner2006-03-091-3/+1
| | | | llvm-svn: 26646
* yes yes, enabled debug output is badChris Lattner2006-03-091-3/+0
| | | | llvm-svn: 26637
* switch the t-d scheduler to use a really dumb and trivial critical pathChris Lattner2006-03-091-1/+104
| | | | | | latency priority function. llvm-svn: 26636
* Pull latency information for target instructions out of the latency tables. :)Chris Lattner2006-03-091-46/+80
| | | | | | | | | Only enable this with -use-sched-latencies, I'll enable it by default with a clean nightly tester run tonight. PPC is the only target that provides latency info currently. llvm-svn: 26634
* PriorityQueue is an instance var, use it.Chris Lattner2006-03-091-39/+33
| | | | llvm-svn: 26632
* add some commentsChris Lattner2006-03-091-8/+13
| | | | llvm-svn: 26631
* Refactor the priority mechanism one step further: now that it is a separateChris Lattner2006-03-091-136/+185
| | | | | | | | class, sever its implementation from the interface. Now we can provide new implementations of the same interface (priority computation) without touching the scheduler itself. llvm-svn: 26630
* Split the priority function computation and priority queue management outChris Lattner2006-03-081-113/+150
| | | | | | of the ScheduleDAGList class into a new SchedulingPriorityQueue class. llvm-svn: 26613
* switch from an explicitly managed list of SUnits to a simple vector of sunitsChris Lattner2006-03-081-35/+28
| | | | llvm-svn: 26612
* Shrinkify some fields, fit to 80 columnsChris Lattner2006-03-081-11/+11
| | | | llvm-svn: 26611
* remove "Slot", it is deadChris Lattner2006-03-081-32/+31
| | | | llvm-svn: 26609
* Change the interface for getting a target HazardRecognizer to be more clean.Chris Lattner2006-03-081-12/+11
| | | | llvm-svn: 26608
* Fix some formatting, when looking for hazards, prefer target nodes overChris Lattner2006-03-071-7/+15
| | | | | | things like copyfromreg. llvm-svn: 26586
* update file commentChris Lattner2006-03-061-3/+8
| | | | llvm-svn: 26573
* Remove some code that doesn't make senseEvan Cheng2006-03-061-12/+5
| | | | llvm-svn: 26572
* Remove SUnit::Priority1: it is re-calculated on demand as number of liveEvan Cheng2006-03-061-35/+25
| | | | | | range to be generated. llvm-svn: 26570
* Hoist the HazardRecognizer out of the ScheduleDAGList.cpp file to whereChris Lattner2006-03-061-108/+22
| | | | | | | | targets can implement them. Make the top-down scheduler non-g5-specific. Remove the old testing hazard recognizer. llvm-svn: 26569
* Comment fixesChris Lattner2006-03-051-2/+2
| | | | llvm-svn: 26567
* When a hazard recognizer needs noops to be inserted, do so. This representsChris Lattner2006-03-051-10/+15
| | | | | | noops as null pointers in the instruction sequence. llvm-svn: 26564
* Implement G5HazardRecognizer as a trivial thing that wants 5 cycles betweenChris Lattner2006-03-051-2/+42
| | | | | | copyfromreg nodes. Clearly useful! llvm-svn: 26559
* Add basic hazard recognizer support. noop insertion isn't complete yet though.Chris Lattner2006-03-051-15/+104
| | | | llvm-svn: 26558
* Split the list scheduler into top-down and bottom-up pieces. The priorityChris Lattner2006-03-051-43/+179
| | | | | | | | function of the top-down scheduler are completely bogus currently, and having (future) PPC specific in this file is also wrong, but this is a small incremental step. llvm-svn: 26552
* Move the available queue to being inside the ListSchedule method, since itChris Lattner2006-03-051-10/+15
| | | | | | bounds its lifetime. llvm-svn: 26550
* A bit more tweakingEvan Cheng2006-03-031-6/+24
| | | | llvm-svn: 26500
* Fix VC++ compilation errors.Jeff Cohen2006-03-031-4/+4
| | | | llvm-svn: 26498
* - Fixed some priority calculation bugs that were causing bug 478. Among them:Evan Cheng2006-03-021-64/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | a predecessor appearing more than once in the operand list was counted as multiple predecessor; priority1 should be updated during scheduling; CycleBound was updated after the node is inserted into priority queue; one of the tie breaking condition was flipped. - Take into consideration of two address opcodes. If a predecessor is a def&use operand, it should have a higher priority. - Scheduler should also favor floaters, i.e. nodes that do not have real predecessors such as MOV32ri. - The scheduling fixes / tweaks fixed bug 478: .text .align 4 .globl _f _f: movl 4(%esp), %eax movl 8(%esp), %ecx movl %eax, %edx imull %ecx, %edx imull %eax, %eax imull %ecx, %ecx addl %eax, %ecx leal (%ecx,%edx,2), %eax ret It is also a slight performance win (1% - 3%) for most tests. llvm-svn: 26470
* make -debug output less newlineyChris Lattner2006-02-021-2/+1
| | | | llvm-svn: 25895
* Clean up some code; improve efficiency; and fixed a potential bug involvingEvan Cheng2006-01-261-150/+127
| | | | | | chain successors. llvm-svn: 25630
* Don't break the optimized build (by incorrect placement of #endif)Reid Spencer2006-01-251-1/+1
| | | | llvm-svn: 25613
* Fix VC++ compilation error.Jeff Cohen2006-01-251-1/+1
| | | | llvm-svn: 25604
* Bottom up register usage reducing list scheduler.Evan Cheng2006-01-251-21/+451
| | | | llvm-svn: 25601
* Skeleton of the list schedule.Evan Cheng2006-01-231-0/+61
llvm-svn: 25544
OpenPOWER on IntegriCloud