summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* 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
OpenPOWER on IntegriCloud