summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
Commit message (Collapse)AuthorAgeFilesLines
* LiveIntervalUpdate validators weren't recorded after the calls to ↵Pete Cooper2012-04-181-6/+6
| | | | | | std::for_each. Turns out std::for_each doesn't update the variable passed in for the functor but instead copy constructs a new one. llvm-svn: 155041
* misched: fix LiveInterval update for bottom-up schedulingAndrew Trick2012-03-211-3/+13
| | | | llvm-svn: 153162
* misched: fix LI update for bottom-up.Andrew Trick2012-03-211-1/+7
| | | | llvm-svn: 153158
* Stop fixing bad machine code in LiveIntervalAnalysis.Jakob Stoklund Olesen2012-03-041-15/+3
| | | | | | | | The first def of a virtual register cannot also read the register. Assert on such bad machine code instead of trying to fix it. TwoAddressInstructionPass should never create code like that. llvm-svn: 152010
* Move getBundleStart() into MachineInstrBundle.h.Jakob Stoklund Olesen2012-03-011-1/+1
| | | | | | | | | This allows the function to be inlined, and makes it suitable for use in getInstructionIndex(). Also provide a const version. C++ is great for touch typing practice. llvm-svn: 151782
* Add API "handleMoveIntoBundl" for updating liveness when moving instructions ↵Lang Hames2012-02-211-13/+68
| | | | | | | | | | | | into bundles. This method takes a bundle start and an MI being bundled, and makes the intervals for the MI's operands appear to start/end on the bundle start. Also fixes some minor cosmetic issues (whitespace, naming convention) in the HMEditor code. llvm-svn: 151099
* Fix some bugs in HMEditor's moveAllOperandsInto logic.Lang Hames2012-02-211-9/+10
| | | | llvm-svn: 151006
* Silence operator precedence warning.Benjamin Kramer2012-02-191-1/+1
| | | | llvm-svn: 150921
* Add machinery for pushing live ranges onto bundle starts while bundling.Lang Hames2012-02-191-2/+207
| | | | llvm-svn: 150915
* Simplify moveEnteringDownFrom rules.Lang Hames2012-02-191-11/+3
| | | | llvm-svn: 150914
* Skip through instructions rather than operands when looking for last use slot.Lang Hames2012-02-191-1/+1
| | | | llvm-svn: 150912
* Fix TODO and trailing whitespace.Lang Hames2012-02-191-10/+14
| | | | llvm-svn: 150910
* Defer sanity checks on live intervals until after all have been updated. ↵Lang Hames2012-02-191-171/+170
| | | | | | Hold (LiveInterval, LiveRange) pairs to update, rather than vregs. llvm-svn: 150909
* Bring HMEditor into line with LLVM coding standards.Lang Hames2012-02-171-160/+163
| | | | llvm-svn: 150851
* Sink variable into assertMatt Beaumont-Gay2012-02-171-2/+2
| | | | llvm-svn: 150841
* Add support for regmask slots to HMEditor. Also fixes a comment error.Lang Hames2012-02-171-3/+17
| | | | llvm-svn: 150840
* Refactor 'handleMove' code in live intervals. Clients of LiveIntervals won't seeLang Hames2012-02-171-211/+245
| | | | | | | | | any changes. Internally this adds a private inner class HMEditor, to LiveIntervals. HMEditor provides an API for updating live intervals when code is moved or bundled. llvm-svn: 150826
* Oops - isRegLiveIntoSuccessor is used in non-assert builds now. Remove ↵Lang Hames2012-02-171-2/+0
| | | | | | NDEBUG guards. llvm-svn: 150771
* Turn off assertion, conservatively compute liveness for live-in ↵Lang Hames2012-02-171-8/+10
| | | | | | un-allocatable registers. llvm-svn: 150768
* Make LiveIntervals::handleMove() bundle aware.Lang Hames2012-02-151-4/+6
| | | | llvm-svn: 150630
* Fix assertion condition.Lang Hames2012-02-151-1/+1
| | | | llvm-svn: 150627
* Remove overly conservative assert.Lang Hames2012-02-151-1/+0
| | | | llvm-svn: 150608
* Don't emit live ranges for physregs live-ins that are dead.Lang Hames2012-02-151-2/+3
| | | | llvm-svn: 150553
* Disentangle moving a machine instr from updating LiveIntervals.Lang Hames2012-02-151-12/+7
| | | | llvm-svn: 150552
* Use the proper clobber check in handleLiveInRegister().Jakob Stoklund Olesen2012-02-141-1/+1
| | | | | | | | | | | | When a physreg is live in to a basic block, look for any instruction in the block that clobbers the physreg. The instruction doesn't have to properly redefine the register, any overlapping clobber is OK. This slightly changes live ranges when compiling with register masks. llvm-svn: 150528
* Dump live intervals in numerical order.Jakob Stoklund Olesen2012-02-141-4/+15
| | | | | | The old DenseMap hashed order was very confusing. llvm-svn: 150527
* Don't create a new copy of reserved regs - we already have one handy.Lang Hames2012-02-141-4/+2
| | | | llvm-svn: 150525
* Tighten physical register invariants: Allocatable physical registers canLang Hames2012-02-141-9/+43
| | | | | | only be live in to a block if it is the function entry point or a landing pad. llvm-svn: 150494
* Use convenience function for consistency.Lang Hames2012-02-141-2/+1
| | | | llvm-svn: 150457
* LiveIntervalAnalysis does not depend on MachineLoopInfo.Andrew Trick2012-02-131-4/+2
| | | | llvm-svn: 150411
* RegAlloc superpass: includes phi elimination, coalescing, and scheduling.Andrew Trick2012-02-101-14/+2
| | | | | | | | | | | | | | | | Creates a configurable regalloc pipeline. Ensure specific llc options do what they say and nothing more: -reglloc=... has no effect other than selecting the allocator pass itself. This patch introduces a new umbrella flag, "-optimize-regalloc", to enable/disable the optimizing regalloc "superpass". This allows for example testing coalscing and scheduling under -O0 or vice-versa. When a CodeGen pass requires the MachineFunction to have a particular property, we need to explicitly define that property so it can be directly queried rather than naming a specific Pass. For example, to check for SSA, use MRI->isSSA, not addRequired<PHIElimination>. CodeGen transformation passes are never "required" as an analysis ProcessImplicitDefs does not require LiveVariables. We have a plan to massively simplify some of the early passes within the regalloc superpass. llvm-svn: 150226
* Remove unused 'isAlias' parameter.Lang Hames2012-02-101-8/+3
| | | | llvm-svn: 150224
* Constrain the regmask search space for local live ranges.Jakob Stoklund Olesen2012-02-101-3/+13
| | | | | | | When checking a local live range for interference, restrict the binary search to the single block. llvm-svn: 150220
* Cache basic block boundaries for faster RegMaskSlots access.Jakob Stoklund Olesen2012-02-101-0/+9
| | | | | | | Provide API to get a list of register mask slots and bits in a basic block. llvm-svn: 150219
* Optimize LiveIntervals::intervalIsInOneMBB().Jakob Stoklund Olesen2012-02-101-17/+22
| | | | | | | | No looping and binary searches necessary. Return a pointer to the containing block instead of just a bool. llvm-svn: 150218
* Fix kill flags when moving instructions using LiveIntervals::moveInstr(...).Lang Hames2012-02-091-6/+23
| | | | llvm-svn: 150150
* Remove assertion. Not all use operands are reads.Lang Hames2012-02-091-3/+0
| | | | llvm-svn: 150149
* Keep track of register masks in LiveIntervalAnalysis.Jakob Stoklund Olesen2012-02-081-0/+62
| | | | | | | | | | | | | Build an ordered vector of register mask operands (i.e., calls) when computing live intervals. Provide a checkRegMaskInterference() function that computes a bit mask of usable registers for a live range. This is a quick way of determining of a live range crosses any calls, and restricting it to the callee saved registers if it does. Previously, we had to discover call clobbers for each candidate register independently. llvm-svn: 150077
* Added MachineInstr::isBundled() to check if an instruction is part of a bundle.Andrew Trick2012-02-081-1/+1
| | | | llvm-svn: 150044
* Drop the REDEF_BY_EC VNInfo flag.Jakob Stoklund Olesen2012-02-041-2/+0
| | | | | | | | | | A live range that has an early clobber tied redef now looks like a normal tied redef, except the early clobber def uses the early clobber slot. This is enough to handle any strange interference problems. llvm-svn: 149769
* Correctly terminate a physreg redefined by an early clobber.Jakob Stoklund Olesen2012-02-041-1/+1
| | | | | | | | | | | | | | | | | I don't have a test that fails because of this, but a test case like CodeGen/X86/2009-12-01-EarlyClobberBug.ll exposes the problem. EAX is redefined by a tied early clobber operand on inline asm, and the live range should look like this: %EAX,inf = [48r,64e:0)[64e,80r:1) 0@48r 1@64e Previously, the two values got merged: %EAX,inf = [48r,80r:0) 0@48r With this bug fixed, the REDEF_BY_EC VNInfo flag is no longer needed. llvm-svn: 149768
* Don't store COPY pointers in VNInfo.Jakob Stoklund Olesen2012-02-041-30/+10
| | | | | | | | | | If a value is defined by a COPY, that instuction can easily and cheaply be found by getInstructionFromIndex(VNI->def). This reduces the size of VNInfo from 24 to 16 bytes, and improves llc compile time by 3%. llvm-svn: 149763
* Trim headers.Jakob Stoklund Olesen2012-02-031-8/+0
| | | | llvm-svn: 149722
* Delete some dead code.Jakob Stoklund Olesen2012-02-031-5/+0
| | | | llvm-svn: 149717
* Here's a new one: GCC was complaining about an only-used-in-assertsMatt Beaumont-Gay2012-01-301-2/+2
| | | | | | *function*. Wrap the function in #ifndef NDEBUG. llvm-svn: 149259
* Silence warning about parens for && within ||Lang Hames2012-01-271-1/+1
| | | | llvm-svn: 149152
* Add a "moveInstr" method to LiveIntervals. This can be used to move instructionsLang Hames2012-01-271-0/+201
| | | | | | | | | around within a basic block while maintaining live-intervals. Updated ScheduleTopDownLive in MachineScheduler.cpp to use the moveInstr API when reordering MIs. llvm-svn: 149147
* Don't add live ranges for aliases of physregs that are live in to theLang Hames2012-01-251-5/+0
| | | | | | | | function. They don't appear to be used, and are inconsistent with handling of other physreg intervals (i.e. intervals that are not live-in) where ranges are not inserted for aliases. llvm-svn: 148986
* Always break upon finding a vreg operand (in Release as well as +Asserts). ↵Lang Hames2012-01-251-6/+1
| | | | | | Remove assertion which can no longer trigger. llvm-svn: 148984
* Fixed macro condition.Lang Hames2012-01-181-1/+1
| | | | llvm-svn: 148408
OpenPOWER on IntegriCloud