summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-apply 55467 with fix. If copy is being replaced by remat'ed def, transfer ↵Evan Cheng2008-08-301-4/+76
| | | | | | the implicit defs onto the remat'ed instruction. llvm-svn: 55564
* Revert r55467; it causes regressions in UnitTests/Vector/divides,Dan Gohman2008-08-281-61/+4
| | | | | | Benchmarks/sim/sim, and others on x86-64. llvm-svn: 55475
* If a copy isn't coalesced, but its src is defined by trivial computation. ↵Evan Cheng2008-08-281-4/+61
| | | | | | Re-materialize the src to replace the copy. llvm-svn: 55467
* Convert uses of std::vector in TargetInstrInfo to SmallVector. This change ↵Owen Anderson2008-08-141-1/+1
| | | | | | had to be propoagated down into all the targets and up into all clients of this API. llvm-svn: 54802
* Use empty() instead of begin() == end().Dan Gohman2008-08-141-2/+2
| | | | llvm-svn: 54780
* Make the allocation of LiveIntervals explicit, rather than holding them in ↵Owen Anderson2008-08-131-2/+2
| | | | | | | | the r2iMap_ by value. This will prevent references to them from being invalidated if the map is changed. llvm-svn: 54763
* Remove #if 0.Evan Cheng2008-08-051-5/+0
| | | | llvm-svn: 54347
* Fix PR2568: Fix bug that cause redudant kill marker after its live interval ↵Evan Cheng2008-08-051-1/+3
| | | | | | has been extended due to coalescing. llvm-svn: 54346
* Fix a compile-time regression introduced by my heuristic-changing patch. I ↵Owen Anderson2008-07-231-1/+1
| | | | | | | | | forgot to multiply the instruction count by a constant factor in a few places, which caused the register allocator to require many more iterations. llvm-svn: 53959
* Change the heuristics used in the coalescer, register allocator, and withinOwen Anderson2008-07-221-8/+8
| | | | | | | live intervals itself to use an instruction count approximation that is not affected by inserting empty indices. llvm-svn: 53937
* Subreg live interval valno may not have a corresponding def machineinstr ↵Evan Cheng2008-07-171-1/+1
| | | | | | since it's less precise. llvm-svn: 53734
* Use getMBBEndIdx rather than assuming that the end is right after the last ↵Owen Anderson2008-06-231-1/+1
| | | | | | instruction in the block. llvm-svn: 52649
* Undo spill weight tweak. Need to investigate the performance regressions.Evan Cheng2008-06-211-2/+1
| | | | llvm-svn: 52572
* Coalesce copy from one register class to a sub register class. e.g. ↵Evan Cheng2008-06-191-22/+85
| | | | | | X86::MOV16to16_. llvm-svn: 52480
* When extending a liveinterval by commuting, don't throw away the live ranges ↵Evan Cheng2008-06-171-2/+13
| | | | | | that are not affected. llvm-svn: 52430
* The coalescer doesn't need LiveVariables now that we have register use ↵Owen Anderson2008-05-301-14/+6
| | | | | | iterators. llvm-svn: 51790
* Fix PR2289: vr defined by multiple implicit_def as result of coalescing.Evan Cheng2008-05-281-6/+9
| | | | llvm-svn: 51648
* Fix PR2343. An *interesting* coalescer bug.Evan Cheng2008-05-211-1/+27
| | | | | | | | | | | | | | BB1: vr1025 = copy vr1024 .. BB2: vr1024 = op = op vr1025 <loop eventually branch back to BB1> Even though vr1025 is copied from vr1024, it's not safe to coalesced them since live range of vr1025 intersects the def of vr1024. This happens when vr1025 is assigned the value of the previous iteration of vr1024 in the loop. llvm-svn: 51394
* Change class' public PassInfo variables to by initialized with theDan Gohman2008-05-131-1/+1
| | | | | | | | | | | address of the PassInfo directly instead of calling getPassInfo. This eliminates a bunch of dynamic initializations of static data. Also, fold RegisterPassBase into PassInfo, make a bunch of its data members const, and rearrange some code to initialize data members in constructors instead of using setter member functions. llvm-svn: 51022
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-14/+12
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Another extract_subreg coalescing bug.Evan Cheng2008-04-291-1/+3
| | | | | | | | e.g. vr1024<2> extract_subreg vr1025, 2 If vr1024 do not have the same register class as vr1025, it's not safe to coalesce this away. For example, vr1024 might be a GPR32 while vr1025 might be a GPR64. llvm-svn: 50385
* - Check if a register is livein before removing it. It may have already been ↵Evan Cheng2008-04-241-30/+30
| | | | | | | | removed. - Do not iterate over SmallPtrSet, the order of iteration is not deterministic. llvm-svn: 50209
* Correct comment.Evan Cheng2008-04-181-2/+2
| | | | llvm-svn: 49913
* Not safe to "kill" a register if its live range extends pass the end of ↵Evan Cheng2008-04-181-3/+29
| | | | | | block branch. llvm-svn: 49911
* Be more careful with insert_subreg and extract_subreg where either source or ↵Evan Cheng2008-04-171-27/+54
| | | | | | destination operand has already been coalesced with another register that's defined by a insert_subreg or extract_subreg. llvm-svn: 49843
* Use correct name for method in comment.Bill Wendling2008-04-171-4/+4
| | | | llvm-svn: 49841
* Fix a sub-register indice propagation bug.Evan Cheng2008-04-171-5/+14
| | | | llvm-svn: 49832
* After reading memory that's already freed.Evan Cheng2008-04-161-18/+20
| | | | llvm-svn: 49810
* Fix PR2226. Avoid using uninitialized variables.Evan Cheng2008-04-161-13/+28
| | | | llvm-svn: 49807
* Avoid read after free.Evan Cheng2008-04-161-1/+1
| | | | llvm-svn: 49760
* Remove implicit_def instructions that become dead as result of coalescing.Evan Cheng2008-04-101-19/+37
| | | | llvm-svn: 49513
* A copy instruction may use a register multiple times on some targets. Change ↵Evan Cheng2008-04-101-2/+6
| | | | | | them all. llvm-svn: 49491
* - More aggressively coalescing away copies whose source is defined by an ↵Evan Cheng2008-04-091-72/+268
| | | | | | | | implicit_def. - Added insert_subreg coalescing support. llvm-svn: 49448
* Missed a hasInterval check.Evan Cheng2008-04-091-0/+2
| | | | llvm-svn: 49415
* - 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
OpenPOWER on IntegriCloud