summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Machine CSE preserves CFG. Pass manager was freeing machineloopinfo after ↵Evan Cheng2010-08-171-0/+1
| | | | | | machine cse before. llvm-svn: 111281
* silence warningJim Grosbach2010-08-171-0/+5
| | | | llvm-svn: 111274
* Add hook to examine an instruction referencing a frame index to determineJim Grosbach2010-08-171-2/+52
| | | | | | | | | | | | | | | whether to allocate a virtual frame base register to resolve the frame index reference in it. Implement a simple version for ARM to aid debugging. In LocalStackSlotAllocation, scan the function for frame index references to local frame indices and ask the target whether to allocate virtual frame base registers for any it encounters. Purely infrastructural for debug output. Next step is to actually allocate base registers, then add intelligent re-use of them. rdar://8277890 llvm-svn: 111262
* Move the decision logic whether it's a good idea to split a critical edge to ↵Evan Cheng2010-08-173-13/+15
| | | | | | clients. Also fixed an erroneous check. An edge is only a back edge when the from and to blocks are in the same loop. llvm-svn: 111256
* Fix debug message.Evan Cheng2010-08-171-1/+1
| | | | llvm-svn: 111250
* Fix typo.Eric Christopher2010-08-171-1/+1
| | | | llvm-svn: 111223
* PHI elimination should not break back edge. It can cause some significant ↵Evan Cheng2010-08-172-5/+14
| | | | | | | | | | | | | | | | | | | | | code placement issues. rdar://8263994 good: LBB0_2: mov r2, r0 . . . mov r1, r2 bne LBB0_2 bad: LBB0_2: mov r2, r0 . . . @ BB#3: mov r1, r2 b LBB0_2 llvm-svn: 111221
* tidy up. remove unused local.Jim Grosbach2010-08-162-2/+2
| | | | llvm-svn: 111206
* Better handle alignment requirements for local objects in pre-regalloc frameJim Grosbach2010-08-162-35/+15
| | | | | | | | | | mapping. Have the local block track its alignment requirement, and then apply that when the block itself is allocated. Previously, offsets could get adjusted in PEI to be different, relative to one another, than the block allocation thought they would be, which defeats the point of doing the allocation this way. Continuing rdar://8277890 llvm-svn: 111197
* Until uleb/sleb are MC-ized, add a hack to make them work with ELF objectEli Friedman2010-08-161-2/+2
| | | | | | emission. llvm-svn: 111177
* track local frame size in MFI, not local to the pass, since PEI needs it.Jim Grosbach2010-08-161-4/+1
| | | | llvm-svn: 111164
* Remove unused functions.Jakob Stoklund Olesen2010-08-162-35/+0
| | | | llvm-svn: 111156
* Update CMake build.Ted Kremenek2010-08-141-1/+1
| | | | llvm-svn: 111063
* Add a local stack object block allocation pass. This is still anJim Grosbach2010-08-144-0/+218
| | | | | | | | | | | | | | | | | | experimental pass that allocates locals relative to one another before register allocation and then assigns them to actual stack slots as a block later in PEI. This will eventually allow targets with limited index offset range to allocate additional base registers (not just FP and SP) to more efficiently reference locals, as well as handle situations where locals cannot be referenced via SP or FP at all (dynamic stack realignment together with variable sized objects, for example). It's currently incomplete and almost certainly buggy. Work in progress. Disabled by default and gated via the -enable-local-stack-alloc command line option. rdar://8277890 llvm-svn: 111059
* Clean up the Spiller.h interface.Jakob Stoklund Olesen2010-08-136-44/+31
| | | | | | | | | The earliestStart argument is entirely specific to linear scan allocation, and can be easily calculated by RegAllocLinearScan. Replace std::vector with SmallVector. llvm-svn: 111055
* Implement splitting inside a single block.Jakob Stoklund Olesen2010-08-133-5/+95
| | | | | | | | When a live range is contained a single block, we can split it around instruction clusters. The current approach is very primitive, splitting before and after the largest gap between uses. llvm-svn: 111043
* tidy up whitespace a bitJim Grosbach2010-08-131-7/+6
| | | | llvm-svn: 111019
* Let LiveInterval::addRange extend existing ranges, it will verify that valueJakob Stoklund Olesen2010-08-131-5/+2
| | | | | | | | | | numbers match. The old check could accidentally leave holes in openli. Also let useIntv add all ranges for the phi-def value inserted by enterIntvAtEnd. This works as long at the value mapping is established in enterIntvAtEnd. llvm-svn: 110995
* Remember to actually update SplitAnalysis statistics now that we have a fancyJakob Stoklund Olesen2010-08-131-0/+1
| | | | | | function to do it. llvm-svn: 110994
* Handle an empty dupli.Jakob Stoklund Olesen2010-08-121-2/+8
| | | | | | | | | | | | | | | | | | | | This can happen if the original interval has been broken into two disconnected parts. Ideally, we should be able to detect when the graph is disconnected and create separate intervals, but that code is not implemented yet. Example: Two basic blocks are both branching to a loop header. Our interval is defined in both basic blocks, and live into the loop along both edges. We decide to split the interval around the loop. The interval is split into an inside part and an outside part. The outside part now has two disconnected segments, one in each basic block. If we later decide to split the outside interval into single blocks, we get one interval per basic block and an empty dupli for the remainder. llvm-svn: 110976
* Update the SplitAnalysis statistics as uses are moved from curli to the newJakob Stoklund Olesen2010-08-122-11/+44
| | | | | | | split intervals. THis means the analysis can be used for multiple splits as long as curli doesn't shrink. llvm-svn: 110975
* Also recompute HasPHIKill flags in LiveInterval::RenumberValues.Jakob Stoklund Olesen2010-08-122-2/+23
| | | | | | | If a phi-def value were removed from the interval, the phi-kill flags are no longer valid. llvm-svn: 110949
* Remove trailing whitespace.Jakob Stoklund Olesen2010-08-122-47/+47
| | | | llvm-svn: 110944
* Clean up debug output.Jakob Stoklund Olesen2010-08-122-34/+32
| | | | llvm-svn: 110940
* Implement single block splitting.Jakob Stoklund Olesen2010-08-123-5/+158
| | | | | | | | | | Before spilling a live range, we split it into a separate range for each basic block where it is used. That way we only get one reload per basic block if the new smaller ranges can allocate to a register. This type of splitting is already present in the standard spiller. llvm-svn: 110934
* Fix a FIXME. The SlotIndex::Slot enum should be private.Jakob Stoklund Olesen2010-08-111-5/+3
| | | | llvm-svn: 110826
* Turn optimize compares back on with fix. We needed to test that a machine op wasBill Wendling2010-08-101-1/+1
| | | | | | a register before checking if it was defined. llvm-svn: 110733
* Give up on register class recalculation when the register is used with subregJakob Stoklund Olesen2010-08-101-1/+10
| | | | | | | operands. We don't currently have a hook to provide "the largest super class of A where all registers' getSubReg(subidx) is valid and in B". llvm-svn: 110730
* Revert r110718; it broke clang-i386-darwin9.Dan Gohman2010-08-101-1/+1
| | | | llvm-svn: 110726
* Avoid editing the current live interval during remat.Jakob Stoklund Olesen2010-08-101-3/+3
| | | | | | | | The live interval may be used for a spill slot as well, and that spill slot could be shared by split registers. We cannot shrink it, even if we know the current register won't need the spill slot in that range. llvm-svn: 110721
* More debug spewJakob Stoklund Olesen2010-08-101-0/+2
| | | | llvm-svn: 110720
* Turn optimize cmps on by default so that we can get some testing by the nightlyBill Wendling2010-08-101-1/+1
| | | | | | ARM testers. llvm-svn: 110718
* Do not forget debug info for enums. Use named mdnode to keep track of these ↵Devang Patel2010-08-101-0/+5
| | | | | | types. llvm-svn: 110712
* Implement register class inflation.Jakob Stoklund Olesen2010-08-102-0/+42
| | | | | | | | | When splitting a live range, the new registers have fewer uses and the permissible register class may be less constrained. Recompute the register class constraint from the uses of new registers created for a split. This may let them be allocated from a larger set, possibly avoiding a spill. llvm-svn: 110703
* Recalculate the spill weight and allocation hint for virtual registers createdJakob Stoklund Olesen2010-08-102-2/+9
| | | | | | during live range splitting. llvm-svn: 110686
* Handle TAG_constant for integers.Devang Patel2010-08-101-20/+37
| | | | llvm-svn: 110656
* Update CMake...sorry for the breakage.Bill Wendling2010-08-101-2/+1
| | | | llvm-svn: 110654
* Simplify.Devang Patel2010-08-102-4/+4
| | | | llvm-svn: 110653
* Drop "const". It does not add value here.Devang Patel2010-08-102-10/+10
| | | | llvm-svn: 110652
* Add missing null check reported by Amaury Pouly.Evan Cheng2010-08-101-2/+3
| | | | llvm-svn: 110649
* Do not include file static variable in pubnames list.Devang Patel2010-08-102-54/+38
| | | | | | Refactor and simplify code to avoid redundant checks. llvm-svn: 110642
* Transpose the calculation of spill weights such that we are calculating oneJakob Stoklund Olesen2010-08-104-115/+128
| | | | | | | | | | | | | | register at a time. This turns out to be slightly faster than iterating over instructions, but more importantly, it allows us to compute spill weights for new registers created after the spill weight pass has run. Also compute the allocation hint at the same time as the spill weight. This allows us to use the spill weight as a cost metric for copies, and choose the most profitable hint if there is more than one possibility. The new hints provide a very small (< 0.1%) but universal code size improvement. llvm-svn: 110631
* Merge the OptimizeExts and OptimizeCmps passes into one PeepholeOptimizerBill Wendling2010-08-093-165/+124
| | | | | | | pass. This pass should expand with all of the small, fine-grained optimization passes to reduce compile time and increase happiment. llvm-svn: 110627
* Undo accidental commit.Devang Patel2010-08-092-38/+54
| | | | llvm-svn: 110623
* Simplify. Avoid redundant checks.Devang Patel2010-08-092-54/+38
| | | | llvm-svn: 110621
* Refactor.Devang Patel2010-08-091-9/+5
| | | | llvm-svn: 110607
* Refactoring. Update DbgVarible to handle queries itself.Devang Patel2010-08-092-82/+93
| | | | llvm-svn: 110600
* It is ok, and convenient, to pass descriptors by value.Devang Patel2010-08-092-41/+41
| | | | llvm-svn: 110590
* A REG_SEQUENCE instruction may use the same register twice.Jakob Stoklund Olesen2010-08-091-1/+11
| | | | | | | | | If we are emitting COPY instructions for the REG_SEQUENCE, make sure the kill flag goes on the last COPY. Otherwise we may be using a killed register. <rdar://problem/8287792> llvm-svn: 110589
* Rename a method.Devang Patel2010-08-091-3/+3
| | | | llvm-svn: 110586
OpenPOWER on IntegriCloud