summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
Commit message (Collapse)AuthorAgeFilesLines
* - Turn copies of implicit_def into implicit_def instructions.Evan Cheng2008-04-031-6/+65
| | | | | | - Be smarter about coalescing copies from implicit_def. llvm-svn: 49168
* One more coalescer fix wrt deadness propagation.Evan Cheng2008-03-261-14/+22
| | | | llvm-svn: 48837
* Avoid commuting a def MI in order to coalesce a copy instruction away if any ↵Evan Cheng2008-03-261-2/+12
| | | | | | use of the same val# is a copy instruction that has already been coalesced. llvm-svn: 48833
* lastRegisterUse() should ignore identity copies. Those will be erased.Evan Cheng2008-03-251-7/+14
| | | | llvm-svn: 48759
* If the coalescer commuted a def MI to allow coalescing, it can changed a ↵Evan Cheng2008-03-241-1/+2
| | | | | | previously coalesced copy into an non-identity copy. llvm-svn: 48752
* A couple of kill marker maintainence bug.Evan Cheng2008-03-211-0/+4
| | | | llvm-svn: 48653
* Fixed a coalescer bug caused by a typo.Evan Cheng2008-03-191-1/+1
| | | | llvm-svn: 48526
* Rewrite code that propagate isDead information after a dead copy is ↵Evan Cheng2008-03-181-77/+146
| | | | | | coalesced. This remove some ugly spaghetti code and fixed a number of subtle bugs. llvm-svn: 48490
* Remove unused options.Evan Cheng2008-03-131-13/+0
| | | | llvm-svn: 48319
* - Fix a subtle bug in RemoveCopyByCommutingDef. ALR is the live range where ↵Evan Cheng2008-03-101-7/+52
| | | | | | | | | | | | | | | | | | the source is defined; BLR is the live range which is defined by the copy. If ALR and BLR overlaps and end of BLR extends beyond end of ALR, e.g. A = or A, B ... B = A ... C = A<kill> ... = B then do not add kills of A to the newly created B interval. - Also fix some kill info update bug. llvm-svn: 48141
* Fix a coalescer bug wrt how dead copy interval is shortened.Evan Cheng2008-03-051-13/+30
| | | | llvm-svn: 47966
* Refactor code. Remove duplicated functions that basically do the same thing asEvan Cheng2008-03-051-26/+9
| | | | | | findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies. llvm-svn: 47927
* No need for coalescer to update kills. Only copies are coalesced and those ↵Evan Cheng2008-02-291-61/+3
| | | | | | instructions will be deleted. Doh. llvm-svn: 47749
* Rename PrintableName to Name.Bill Wendling2008-02-261-1/+1
| | | | llvm-svn: 47629
* Change "Name" to "AsmName" in the target register info. Gee, a refactoring toolBill Wendling2008-02-261-1/+1
| | | | | | would have been a Godsend here! llvm-svn: 47625
* Enable -coalescer-commute-instrs by default.Evan Cheng2008-02-261-1/+1
| | | | llvm-svn: 47623
* This is possible:Evan Cheng2008-02-261-2/+8
| | | | | | | | | vr1 = extract_subreg vr2, 3 ... vr3 = extract_subreg vr1, 2 The end result is vr3 is equal to vr2 with subidx 2. llvm-svn: 47592
* Fix compiler warning.Evan Cheng2008-02-221-1/+1
| | | | llvm-svn: 47468
* Help testing.Evan Cheng2008-02-211-0/+7
| | | | llvm-svn: 47448
* - Remove the previous check which broke coalescer-commute3.llEvan Cheng2008-02-181-5/+5
| | | | | | - For now, conservatively ignore copy MI whose source is a physical register. Commuting its def MI can cause a physical register live interval to be live through a loop (since we know it's live coming into the def MI). llvm-svn: 47281
* For now, avoid commuting def MI for copy MI's whose source is not killed. ↵Evan Cheng2008-02-181-0/+7
| | | | | | That simply trade a live interval for another and because only the non-two-address operands can be folded into loads, may end up pessimising code. llvm-svn: 47262
* Refactor some code; check if commuteInstruction is able to commute the ↵Evan Cheng2008-02-161-17/+29
| | | | | | instruction. llvm-svn: 47208
* The copy instruction being coalesced will be removed, it is not a kill.Evan Cheng2008-02-151-2/+2
| | | | llvm-svn: 47179
* - Removing the infamous r2rMap_ and rep() method. Now the coalescer will updateEvan Cheng2008-02-151-311/+215
| | | | | | | register defs and uses after each successful coalescing. - Also removed a number of hacks and fixed some subtle kill information bugs. llvm-svn: 47167
* Some code clean up.Evan Cheng2008-02-131-33/+34
| | | | llvm-svn: 47060
* * Cannot safely commute an instruction there are other defs which can reach ↵Evan Cheng2008-02-131-1/+5
| | | | | | | | its uses. * Ignore copy instructions which have already been coalesced. llvm-svn: 47056
* Initial support for copy elimination by commuting its definition MI.Evan Cheng2008-02-131-16/+235
| | | | | | | | | | | | | | | | | | | | | PR1877. A3 = op A2 B0<kill> ... B1 = A3 <- this copy ... = op A3 <- more uses ==> B2 = op B0 A2<kill> ... B1 = B2 <- now an identify copy ... = op B2 <- more uses This speeds up FreeBench/neural by 29%, Olden/bh by 12%, oopack_v1p8 by 53%. llvm-svn: 47046
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-64/+64
| | | | llvm-svn: 46930
* Remove unused hidden option.Evan Cheng2008-02-091-6/+1
| | | | llvm-svn: 46903
* Don't recalculate the loop info and loop dominators analyses if they'reBill Wendling2008-01-041-0/+2
| | | | | | preserved. llvm-svn: 45596
* 80-column violations.Bill Wendling2008-01-041-10/+14
| | | | llvm-svn: 45574
* update a couple of references to SSARegMap.Chris Lattner2007-12-311-2/+2
| | | | llvm-svn: 45468
* Rename SSARegMap -> MachineRegisterInfo in keeping with the idea Chris Lattner2007-12-311-14/+13
| | | | | | | | | | | | | | that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. llvm-svn: 45467
* More cleanups for MachineOperand:Chris Lattner2007-12-301-3/+3
| | | | | | | | | | - Eliminate the static "print" method for operands, moving it into MachineOperand::print. - Change various set* methods for register flags to take a bool for the value to set it to. Remove unset* methods. - Group methods more logically by operand flavor in MachineOperand.h llvm-svn: 45461
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* The physical register + virtual register joining requirement was much too ↵Evan Cheng2007-12-201-1/+1
| | | | | | strict. llvm-svn: 45253
* Switch over to MachineLoopInfo.Evan Cheng2007-12-111-13/+12
| | | | llvm-svn: 44838
* Add an option to control this heuristic tweak so I can test it.Evan Cheng2007-12-071-1/+6
| | | | llvm-svn: 44671
* Fix for PR1831: if all defs of an interval are re-materializable, then it's ↵Evan Cheng2007-12-061-0/+14
| | | | | | a preferred spill candiate. llvm-svn: 44644
* Replace the odd kill# hack with something less fragile.Evan Cheng2007-11-291-0/+4
| | | | llvm-svn: 44434
* Live interval splitting:Evan Cheng2007-11-171-1/+2
| | | | | | | | | | | | | | | | | | | When a live interval is being spilled, rather than creating short, non-spillable intervals for every def / use, split the interval at BB boundaries. That is, for every BB where the live interval is defined or used, create a new interval that covers all the defs and uses in the BB. This is designed to eliminate one common problem: multiple reloads of the same value in a single basic block. Note, it does *not* decrease the number of spills since no copies are inserted so the split intervals are *connected* through spill and reloads (or rematerialization). The newly created intervals can be spilled again, in that case, since it does not span multiple basic blocks, it's spilled in the usual manner. However, it can reuse the same stack slot as the previously split interval. This is currently controlled by -split-intervals-at-bb. llvm-svn: 44198
* Clean up sub-register implementation by moving subReg information back toEvan Cheng2007-11-141-6/+9
| | | | | | | | | | | MachineOperand auxInfo. Previous clunky implementation uses an external map to track sub-register uses. That works because register allocator uses a new virtual register for each spilled use. With interval splitting (coming soon), we may have multiple uses of the same register some of which are of using different sub-registers from others. It's too fragile to constantly update the information. llvm-svn: 44104
* Refactor some code.Evan Cheng2007-11-121-2/+1
| | | | llvm-svn: 44010
* First step towards moving the coalescer to priority_queue based machinery.Evan Cheng2007-11-061-34/+181
| | | | llvm-svn: 43764
* Move SimpleRegisterCoalescing.h to lib/CodeGen since there is now a commonEvan Cheng2007-11-051-2/+2
| | | | | | register coalescer interface: RegisterCoalescing. llvm-svn: 43714
* Skip over deleted val#'s.Evan Cheng2007-11-051-2/+2
| | | | llvm-svn: 43700
* - Coalesce extract_subreg when both intervals are relatively small.Evan Cheng2007-11-011-23/+46
| | | | | | - Some code clean up. llvm-svn: 43606
* Really fix PR1734. Carefully track which register uses are sub-register uses byEvan Cheng2007-10-181-8/+25
| | | | | | traversing inverse register coalescing map. llvm-svn: 43118
* One more extract_subreg coalescing bug fix.Evan Cheng2007-10-171-1/+1
| | | | llvm-svn: 43065
* Fix PR1734.Evan Cheng2007-10-161-1/+1
| | | | llvm-svn: 43035
OpenPOWER on IntegriCloud