summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix several bugs in the new fast-path:Owen Anderson2008-08-181-16/+16
| | | | | | | | 1) Remove an incorrect assertion. 2) Set the stack slot weight properly. 3) Resize the VirtRegMap when needed. llvm-svn: 54949
* Clients of addIntervalForSpills expect the added intervals to be returned ↵Owen Anderson2008-08-181-0/+9
| | | | | | sorted by starting index. llvm-svn: 54939
* Simplify the fast-patch interval spilling by using ↵Owen Anderson2008-08-181-72/+50
| | | | | | MachineRegisterInfo::reg_iterator. llvm-svn: 54930
* Resurrect some ancient code to add spill ranges without attempting folding, ↵Owen Anderson2008-08-181-0/+105
| | | | | | | | | remat, or splitting. This code has been updated to current APIs in so far as it compiles and, in theory, works, but does not take advantage of recent advancements. For instance, it could be improved by using MachineRegisterInfo::use_iterator. llvm-svn: 54924
* Expunge the last uses of std::map from LiveIntervals.Owen Anderson2008-08-131-13/+13
| | | | llvm-svn: 54766
* Move r2iMap_ over to DenseMap from std::map.Owen Anderson2008-08-131-1/+1
| | | | llvm-svn: 54765
* Make the allocation of LiveIntervals explicit, rather than holding them in ↵Owen Anderson2008-08-131-8/+13
| | | | | | | | the r2iMap_ by value. This will prevent references to them from being invalidated if the map is changed. llvm-svn: 54763
* Oops, didn't mean to commit this.Owen Anderson2008-08-061-0/+2
| | | | llvm-svn: 54425
* Only remap each VNInfo once when doing renumbering.Owen Anderson2008-08-061-13/+15
| | | | llvm-svn: 54420
* Value numbers whose def index is a special sentinel value should not be ↵Owen Anderson2008-07-301-11/+13
| | | | | | remapped. llvm-svn: 54218
* More fixes for corner cases when remapping live range indices.Owen Anderson2008-07-301-10/+10
| | | | llvm-svn: 54186
* Don't decrement the BB remap when we don't need to.Owen Anderson2008-07-291-8/+4
| | | | llvm-svn: 54173
* Fold the useful features of alist and alist_node into ilist, andDan Gohman2008-07-281-1/+1
| | | | | | | | | | | | | | | | a new ilist_node class, and remove them. Unlike alist_node, ilist_node doesn't attempt to manage storage itself, so it avoids the associated problems, including being opaque in gdb. Adjust the Recycler class so that it doesn't depend on alist_node. Also, change it to use explicit Size and Align parameters, allowing it to work when the largest-sized node doesn't have the greatest alignment requirement. Change MachineInstr's MachineMemOperand list from a pool-backed alist to a std::list for now. llvm-svn: 54146
* Fix a typo in a comment.Dan Gohman2008-07-281-1/+1
| | | | llvm-svn: 54136
* Revert my previous patch. In retrospect, this is completely the wrong way ↵Owen Anderson2008-07-251-66/+15
| | | | | | to fix this problem. llvm-svn: 54072
* Special cases are needed in renumbering when dealing with renumbering after ↵Owen Anderson2008-07-251-15/+66
| | | | | | | | | a PHI has been removed. The interval previously defined by the PHI needs to be extended to the beginning of its basic block, and the intervals that were inputs need to be trimmed to the end of their basic blocks. llvm-svn: 54070
* Properly remap live ranges whose end indices are the end of the function.Owen Anderson2008-07-251-4/+13
| | | | llvm-svn: 54061
* Make the remapping of interval indices (particularly ending indices) more ↵Owen Anderson2008-07-251-10/+15
| | | | | | | | | robust. This is tricky business, and will probably take a few more iterations to get the last kinks out of it. llvm-svn: 54043
* Disable the new aggressive remat logic introduced in 54000; it causes someDan Gohman2008-07-251-0/+4
| | | | | | | regressions, such as PR2595. Also, there is a significant code-quality issue in SPEC 464.h264ref and a few others. llvm-svn: 54014
* Enable rematerialization of constants using ↵Dan Gohman2008-07-251-15/+89
| | | | | | | | | | AliasAnalysis::pointsToConstantMemory, and knowledge of PseudoSourceValues. This unfortunately isn't sufficient to allow constants to be rematerialized in PIC mode -- the extra indirection is a complication. llvm-svn: 54000
* Enable the insertion of empty indices into LiveInterals, thereby making ↵Owen Anderson2008-07-231-70/+80
| | | | | | renumbering possible. llvm-svn: 53961
* 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-1/+5
| | | | | | | live intervals itself to use an instruction count approximation that is not affected by inserting empty indices. llvm-svn: 53937
* Fix a memory leak in LiveIntervalAnalysis.Evan Cheng2008-07-191-4/+8
| | | | llvm-svn: 53779
* Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.Dan Gohman2008-07-171-3/+3
| | | | | | | Fix a leak that this turned up in LowerSubregs.cpp. And, comment a leak in LiveIntervalAnalysis.cpp. llvm-svn: 53746
* Typos.Evan Cheng2008-07-121-2/+2
| | | | llvm-svn: 53504
* Fix PR2536: a nasty spiller bug. If a two-address instruction uses a ↵Evan Cheng2008-07-121-0/+23
| | | | | | | | | | | register but the use portion of its live range is not part of its liveinterval, it must be defined by an implicit_def. In that case, do not spill the use. e.g. 8 %reg1024<def> = IMPLICIT_DEF 12 %reg1024<def> = INSERT_SUBREG %reg1024<kill>, %reg1025, 2 The live range [12, 14) are not part of the r1024 live interval since it's defined by an implicit def. It will not conflicts with live interval of r1025. Now suppose both registers are spilled, you can easily see a situation where both registers are reloaded before the INSERT_SUBREG and both target registers that would overlap. llvm-svn: 53503
* - Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply ↵Evan Cheng2008-07-101-4/+6
| | | | | | | | the operand index of def machineoperand and at most one full scan of non-implicit operands is needed. - Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel. llvm-svn: 53394
* Pool-allocation for MachineInstrs, MachineBasicBlocks, andDan Gohman2008-07-071-2/+2
| | | | | | | | | | | MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. llvm-svn: 53212
* - Remove calls to copyKillDeadInfo which is an N^2 function. Instead, ↵Evan Cheng2008-07-031-8/+0
| | | | | | | | propagate kill / dead markers as new instructions are constructed in foldMemoryOperand, convertToThressAddress, etc. - Also remove LiveVariables::instructionChanged, etc. Replace all calls with cheaper calls which update VarInfo kill list. llvm-svn: 53097
* Remember which MachineOperand we were processing, so we don't have to scan ↵Owen Anderson2008-06-251-11/+15
| | | | | | | | the list to find it again later. This speeds up live intervals from 0.37s to 0.30s on instcombine. llvm-svn: 52745
* Undo spill weight tweak. Need to investigate the performance regressions.Evan Cheng2008-06-211-8/+4
| | | | llvm-svn: 52572
* Revert my last patch, which was causing regression test failures.Owen Anderson2008-06-191-78/+69
| | | | llvm-svn: 52485
* Minor spiller tweak to unfavor reload into load/store instructions.Evan Cheng2008-06-191-4/+8
| | | | llvm-svn: 52477
* Insert empty slots into the instruction numbering in live intervals, so that ↵Owen Anderson2008-06-191-69/+78
| | | | | | | | we can more easily add new instructions. llvm-svn: 52475
* Live-through live interval is [mbb start, mbb end+1].Evan Cheng2008-06-171-1/+1
| | | | llvm-svn: 52431
* Remove special case handling of empty MBBs now that we assign indices to them.Owen Anderson2008-06-161-8/+5
| | | | llvm-svn: 52345
* Re-enable empty block indexing by default, since it doesn't seem to have anyOwen Anderson2008-06-161-21/+9
| | | | | | impact on code quality or compile time. llvm-svn: 52329
* Make indexing empty basic blocks an option for the moment.Owen Anderson2008-06-161-9/+21
| | | | llvm-svn: 52306
* Assign indices to empty basic blocks. This will be necessary for ↵Owen Anderson2008-06-161-4/+9
| | | | | | StrongPHIElimination in the near future. llvm-svn: 52300
* Refine stack slot interval weight computation.Evan Cheng2008-06-061-15/+45
| | | | llvm-svn: 52040
* Add a helper for constructing new live ranges that ended from an instruction ↵Owen Anderson2008-06-051-0/+15
| | | | | | to the end of its MBB. llvm-svn: 52012
* Add a stack slot coloring pass. Not yet enabled.Evan Cheng2008-06-041-14/+4
| | | | llvm-svn: 51934
* Correctly handle removed instructions at the beginning of MBBs when renumbering.Owen Anderson2008-06-021-12/+8
| | | | llvm-svn: 51876
* Make the renumbering correct in the face of deleted instructions that have ↵Owen Anderson2008-05-291-7/+73
| | | | | | been removed from the LiveIntervals maps. llvm-svn: 51714
* Remove <iostream>.Bill Wendling2008-05-291-2/+0
| | | | llvm-svn: 51704
* Revert part of my last patch that I didn't intend to commit yet.Owen Anderson2008-05-291-0/+2
| | | | llvm-svn: 51694
* Renumbering needs to account for instruction slot offsets when performing ↵Owen Anderson2008-05-291-7/+20
| | | | | | lookups in the index maps. llvm-svn: 51691
* Remap VNInfo data as well when doing renumbering.Owen Anderson2008-05-281-0/+6
| | | | llvm-svn: 51658
* Factor the numbering computation into a separate method, and add the ↵Owen Anderson2008-05-281-11/+29
| | | | | | slightest attempt at some renumbering logic, which is currently unused. llvm-svn: 51652
OpenPOWER on IntegriCloud