- Aug 17, 2010
-
-
Jim Grosbach authored
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
-
Evan Cheng authored
Move the decision logic whether it's a good idea to split a critical edge to 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
-
Evan Cheng authored
llvm-svn: 111250
-
Eric Christopher authored
llvm-svn: 111223
-
Evan Cheng authored
PHI elimination should not break back edge. It can cause some significant 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
-
Jim Grosbach authored
llvm-svn: 111206
-
Jim Grosbach authored
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
-
- Aug 16, 2010
-
-
Eli Friedman authored
emission. llvm-svn: 111177
-
Jim Grosbach authored
llvm-svn: 111164
-
Jakob Stoklund Olesen authored
llvm-svn: 111156
-
- Aug 14, 2010
-
-
Ted Kremenek authored
llvm-svn: 111063
-
Jim Grosbach authored
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
-
Jakob Stoklund Olesen authored
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
-
- Aug 13, 2010
-
-
Jakob Stoklund Olesen authored
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
-
Jim Grosbach authored
llvm-svn: 111019
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
function to do it. llvm-svn: 110994
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
split intervals. THis means the analysis can be used for multiple splits as long as curli doesn't shrink. llvm-svn: 110975
-
- Aug 12, 2010
-
-
Jakob Stoklund Olesen authored
If a phi-def value were removed from the interval, the phi-kill flags are no longer valid. llvm-svn: 110949
-
Jakob Stoklund Olesen authored
llvm-svn: 110944
-
Jakob Stoklund Olesen authored
llvm-svn: 110940
-
Jakob Stoklund Olesen authored
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
-
- Aug 11, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 110826
-
- Aug 10, 2010
-
-
Bill Wendling authored
a register before checking if it was defined. llvm-svn: 110733
-
Jakob Stoklund Olesen authored
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
-
Dan Gohman authored
llvm-svn: 110726
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
llvm-svn: 110720
-
Bill Wendling authored
ARM testers. llvm-svn: 110718
-
Devang Patel authored
llvm-svn: 110712
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
during live range splitting. llvm-svn: 110686
-
Devang Patel authored
llvm-svn: 110656
-
Bill Wendling authored
llvm-svn: 110654
-
Devang Patel authored
llvm-svn: 110653
-
Devang Patel authored
llvm-svn: 110652
-
Evan Cheng authored
llvm-svn: 110649
-
Devang Patel authored
Refactor and simplify code to avoid redundant checks. llvm-svn: 110642
-
Jakob Stoklund Olesen authored
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
-