summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegisterPressure.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* RegisterPressure: Hide non-const iterators of PressureDiffMatthias Braun2015-10-171-1/+1
| | | | | | | It is too easy to accidentally violate the ordering requirements when modifying the PressureDiff entries through iterators. llvm-svn: 250590
* RegisterPressure: Use range based for, cleanupMatthias Braun2015-10-161-14/+7
| | | | llvm-svn: 250579
* RegisterPressure: LiveRegSet tracks register units not physregsMatthias Braun2015-09-291-1/+1
| | | | | | | There are always more physical registers and register units so the previous behaviour was correct but we can do with less memory. llvm-svn: 248767
* Revert "(HEAD -> master, origin/master, origin/HEAD) RegisterPressure: Move ↵Matthias Braun2015-09-171-30/+32
| | | | | | | | | | LiveInRegs/LiveOutRegs from RegisterPressure to PressureTracker" This reverts commit r247943. Accidental commit, code review was not finished yet. llvm-svn: 247945
* RegisterPressure: Move LiveInRegs/LiveOutRegs from RegisterPressure to ↵Matthias Braun2015-09-171-32/+30
| | | | | | | | PressureTracker Differential Revision: http://reviews.llvm.org/D12814 llvm-svn: 247943
* RegisterPressure: Simplify close{Top|Bottom}()Matthias Braun2015-09-141-12/+2
| | | | | | | | | | | - There are no duplicate registers in LiveRegs list we are copying from and so we do not need to sort the registers. - Simply use SmallVector::apend instead of a loop between begin() and end() with push_back(). Differential Revision: http://reviews.llvm.org/D12813 llvm-svn: 247588
* Fix some comment typos.Benjamin Kramer2015-08-081-1/+1
| | | | llvm-svn: 244402
* RegisterPressure: Add PressureDiff::dump()Matthias Braun2015-07-081-0/+12
| | | | | | | Also display the pressure diff in the case of a getMaxUpwardPressureDelta() verify failure. llvm-svn: 241759
* RegisterPressure: fix debug prints in case of physical registersFiona Glaser2015-05-271-2/+2
| | | | llvm-svn: 238371
* RegisterPressureTracker: reword stale comments.Andrew Trick2015-05-171-7/+12
| | | | llvm-svn: 237544
* Move private classes into anonymous namespacesBenjamin Kramer2015-03-231-0/+2
| | | | | | NFC. llvm-svn: 232944
* Remove unnecessary TargetMachine.h includes.Eric Christopher2014-10-141-1/+0
| | | | llvm-svn: 219672
* Have MachineFunction cache a pointer to the subtarget to make lookupsEric Christopher2014-08-051-1/+1
| | | | | | | | | | | shorter/easier and have the DAG use that to do the same lookup. This can be used in the future for TargetMachine based caching lookups from the MachineFunction easily. Update the MIPS subtarget switching machinery to update this pointer at the same time it runs. llvm-svn: 214838
* Remove the TargetMachine forwards for TargetSubtargetInfo basedEric Christopher2014-08-041-1/+1
| | | | | | information and update all callers. No functional change. llvm-svn: 214781
* Move remaining LLVM_ENABLE_DUMP conditionals out of the headersAlp Toker2014-07-011-2/+3
| | | | | | | | | This macro is sometimes defined manually but isn't (and doesn't need to be) in llvm-config.h so shouldn't appear in the headers, likewise NDEBUG. Instead switch them over to LLVM_DUMP_METHOD on the definitions. llvm-svn: 212130
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-141-2/+2
| | | | | | instead of comparing to nullptr. llvm-svn: 206142
* Phase 1 of refactoring the MachineRegisterInfo iterators to make them suitableOwen Anderson2014-03-131-3/+3
| | | | | | | | | | | | | | | | | | | for use with C++11 range-based for-loops. The gist of phase 1 is to remove the skipInstruction() and skipBundle() methods from these iterators, instead splitting each iterator into a version that walks operands, a version that walks instructions, and a version that walks bundles. This has the result of making some "clever" loops in lib/CodeGen more verbose, but also makes their iterator invalidation characteristics much more obvious to the casual reader. (Making them concise again in the future is a good motivating case for a pre-incrementing range adapter!) Phase 2 of this undertaking with consist of removing the getOperand() method, and changing operator*() of the operand-walker to return a MachineOperand&. At that point, it should be possible to add range views for them that work as one might expect. llvm-svn: 203757
* Fix formatting introduced in r200941David Blaikie2014-02-091-2/+1
| | | | llvm-svn: 201043
* Track register pressure a bit more carefully (weird corner case).Andrew Trick2014-02-061-1/+8
| | | | | | | | | | | | | | | | This solves a problem where a def machine operand has no uses but has not been marked dead. In this case, the initial RP analysis was being extra precise and determining from LiveIntervals the the register was actually dead. This caused us to omit the register from the RP tracker's block live out. That's all good, but the per-instruction summary still accounted for it as a valid def. This could cause an assertion in the tracker later when we underflow pressure. This is from a bug report on an out-of-tree target. It is not reproducible on well-behaved targets. I'm just making an obvious fix without unit test. llvm-svn: 200941
* increase the accuracy of register pressure computation in the presence of ↵Pedro Artigas2013-11-081-6/+27
| | | | | | dead definitions by using live intervals, if available, to identify dead definitions and proceed accordingly. llvm-svn: 194286
* Represent RegUnit liveness with LiveRange instanceMatthias Braun2013-10-101-11/+11
| | | | | | | Previously LiveInterval has been used, but having a spill weight and register number is unnecessary for a register unit. llvm-svn: 192397
* Pass LiveQueryResult by valueMatthias Braun2013-10-101-3/+3
| | | | | | | This makes the API a bit more natural to use and makes it easier to make LiveRanges implementation details private. llvm-svn: 192394
* Added -misched-regpressure option.Andrew Trick2013-09-041-8/+20
| | | | | | | | Register pressure tracking is half the complexity of the scheduler. It's useful to be able to turn it off for compile time and performance comparisons. llvm-svn: 189987
* Use LiveRangeQuery for instruction-level liveness queries.Andrew Trick2013-08-301-6/+8
| | | | | | Remove redundant or bug-prone LiveInterval APIs. llvm-svn: 189685
* mi-sched: update PressureDiffs on-the-fly for liveness.Andrew Trick2013-08-301-22/+18
| | | | | | | This removes all expensive pressure tracking logic from the scheduling critical path of node comparison. llvm-svn: 189643
* Replace LiveInterval::killedAt with isKilledAtInstr.Andrew Trick2013-08-301-3/+3
| | | | | | Return true for LRGs that end at EarlyClobber or Register slots. llvm-svn: 189642
* mi-sched: Precompute a PressureDiff for each instruction, adjust for ↵Andrew Trick2013-08-301-34/+203
| | | | | | | | | | | | | liveness later. Created SUPressureDiffs array to hold the per node PDiff computed during DAG building. Added a getUpwardPressureDelta API that will soon replace the old one. Compute PressureDelta here from the precomputed PressureDiffs. Updating for liveness will come next. llvm-svn: 189640
* Rename to RegPressure API parameters RegUnits.Andrew Trick2013-08-231-13/+14
| | | | llvm-svn: 189123
* Simplify RegPressure helpers.Andrew Trick2013-08-231-15/+12
| | | | llvm-svn: 189122
* Add a convenient PSetIterator for visiting pressure sets affected by a register.Andrew Trick2013-08-231-68/+21
| | | | llvm-svn: 189121
* MI Sched: Track live-thru registers.Andrew Trick2013-07-301-10/+57
| | | | | | | | | | | When registers must be live throughout the scheduling region, increase the limit for the register class. Once we exceed the original limit, they will be spilled, and there's no point further reducing pressure. This isn't a perfect heuristics but avoids a situation where the scheduler could become trapped by trying to achieve the impossible. llvm-svn: 187436
* MI Sched: track register pressure by importance of the set, not weight of ↵Andrew Trick2013-07-251-14/+20
| | | | | | the units. llvm-svn: 187109
* MI-Sched: Adjust regpressure limits for reserved regs.Andrew Trick2013-06-211-4/+4
| | | | llvm-svn: 184564
* MI Sched: fix a typo in RegPressure heuristics.Andrew Trick2013-06-171-1/+1
| | | | llvm-svn: 184131
* Replace erase loop with std::remove_if.Benjamin Kramer2013-02-161-6/+5
| | | | | | This avoids unnecessary copies. No functionality change. llvm-svn: 175367
* RegPressureTracker::dump(): Remove unnecessary argument.Andrew Trick2012-12-051-1/+1
| | | | llvm-svn: 169443
* RegisterPressureTracker: fix findUseBetween to handle DebugValueAndrew Trick2012-12-051-0/+2
| | | | llvm-svn: 169427
* RegisterPressureTracker: unify virtual registers and physical regunits.Andrew Trick2012-12-051-241/+179
| | | | | | Now that live register units are tracked individually, the code can be simplified. llvm-svn: 169426
* RegisterPresssureTracker: Track live physical register by unit.Andrew Trick2012-12-051-94/+87
| | | | | | | | This is much simpler to reason about, more efficient, and fixes some corner cases involving implicit super-register defs. Fixed rdar://12797931. llvm-svn: 169425
* Added RegisterPressureTracker::dump() for debugging.Andrew Trick2012-12-051-5/+16
| | | | llvm-svn: 169359
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+2
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* misched: Fix RegisterPressureTracker handling of DebugVals.Andrew Trick2012-12-011-12/+14
| | | | | | | Assertion failed: (TopRPTracker.getPos() == RegionBegin && "bad initial Top tracker"). rdar://12790302. llvm-svn: 169072
* misched: handle on-the-fly regpressure queries better for 2-addrAndrew Trick2012-11-071-8/+13
| | | | | | instructions without relying on liveintervals. llvm-svn: 167526
* Remove RegisterClassInfo::isReserved() and isAllocatable().Jakob Stoklund Olesen2012-10-151-6/+6
| | | | | | Clients can use the equivalent functions in MRI. llvm-svn: 165990
* Release build: guard dump functions withManman Ren2012-09-111-1/+1
| | | | | | | | "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163339. llvm-svn: 163653
* Release build: guard dump functions with "ifndef NDEBUG"Manman Ren2012-09-061-0/+2
| | | | | | No functional change. llvm-svn: 163339
* misched: When querying RegisterPressureTracker, always save current and max ↵Andrew Trick2012-06-111-2/+8
| | | | | | pressure. llvm-svn: 158340
* misched: regpressure getMaxPressureDelta, revert accidental checkin.Andrew Trick2012-06-111-8/+2
| | | | llvm-svn: 158339
* Register pressure: added getPressureAfterInstr.Andrew Trick2012-06-091-33/+80
| | | | llvm-svn: 158256
* Move RegisterClassInfo.h.Andrew Trick2012-06-061-1/+1
| | | | | | Allow targets to access this API. It's required for RegisterPressure. llvm-svn: 158102
OpenPOWER on IntegriCloud