| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
e.g.
%RDI<def,dead> = MOV64rr %RAX<kill>, %EDI<imp-def>
llvm-svn: 100804
|
|
|
|
|
|
| |
for fear of tying up a physical register.
llvm-svn: 99575
|
|
|
|
| |
llvm-svn: 99544
|
|
|
|
| |
llvm-svn: 99537
|
|
|
|
| |
llvm-svn: 99465
|
|
|
|
| |
llvm-svn: 99113
|
|
|
|
|
|
| |
This reverts commit 98776. It broke the llvm-gcc boot strap.
llvm-svn: 98784
|
|
|
|
|
|
|
|
|
| |
Remove ugly hack that aborted the coalescer before using N^2 time.
This affects functions with very complicated live intervals for physical
registers, i.e. functions with thousands of function calls.
llvm-svn: 98776
|
|
|
|
|
|
|
|
|
| |
cl = EXTRACT_SUBREG reg1024, 1, is overly conservative. It should check
for overlaps of vr's live interval with the super registers of the
physical register (ECX in this case) and let JoinIntervals() handle checking
the coalescing feasibility against the physical register (cl in this case).
llvm-svn: 98251
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
physreg becomes ridiculously high.
std::upper_bound may be log(N), but for sufficiently large live intervals, it
becomes log(N)*cachemiss = a long long time.
This patch improves coalescer time by 4500x for a function with 20000
function calls. The generated code is different, but not significantly worse -
the allocator hints are almost as good as physreg coalescing anyway.
llvm-svn: 98023
|
|
|
|
| |
llvm-svn: 97578
|
|
|
|
| |
llvm-svn: 96995
|
|
|
|
|
|
| |
This changes the stack overflow in PR6363 to an assertion failure.
llvm-svn: 96744
|
|
|
|
|
|
|
|
|
|
|
| |
When coalescing with a physreg, remember to add imp-def and imp-kill when
dealing with sub-registers.
Also fix a related bug in VirtRegRewriter where substitutePhysReg may
reallocate the operand list on an instruction and invalidate the reg_iterator.
This can happen when a register is mentioned twice on the same instruction.
llvm-svn: 96072
|
|
|
|
|
|
| |
This time with fixed test cases.
llvm-svn: 95938
|
|
|
|
| |
llvm-svn: 95921
|
|
|
|
|
|
|
|
| |
tiny interval.
Also avoid division by zero.
llvm-svn: 95917
|
|
|
|
| |
llvm-svn: 95819
|
|
|
|
| |
llvm-svn: 95781
|
|
|
|
|
|
|
|
|
| |
register coalescing. This fixes many crashes and
places where debug info affects codegen (when
dbg.value is lowered to machine instructions, which
it isn't yet in TOT).
llvm-svn: 95739
|
|
|
|
|
|
|
|
|
| |
into TargetOpcodes.h. #include the new TargetOpcodes.h
into MachineInstr. Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the
codebase.
llvm-svn: 95687
|
|
|
|
|
|
| |
Patch by M Wahab!
llvm-svn: 95668
|
|
|
|
| |
llvm-svn: 92592
|
|
|
|
| |
llvm-svn: 91945
|
|
|
|
|
|
| |
This fixes an in-place update bug where code inserted at the end of basic blocks may not be covered by existing intervals which were live across the entire block. It is also consistent with the way ranges are specified for live intervals.
llvm-svn: 91859
|
|
|
|
|
|
| |
own pass: CalculateSpillWeights.
llvm-svn: 91273
|
|
|
|
| |
llvm-svn: 91103
|
|
|
|
|
|
|
|
| |
subregister indices. e.g.:
%reg16404:1<def> = MOV8rr %reg16412:2<kill>
llvm-svn: 91061
|
|
|
|
|
|
| |
Patch by Howard Hinnant!
llvm-svn: 90365
|
|
|
|
|
|
|
|
| |
- A valno should be set HasRedefByEC if there is an early clobber def in the middle of its live ranges. It should not be set if the def of the valno is defined by an early clobber.
- If a physical register def is tied to an use and it's an early clobber, it just means the HasRedefByEC is set since it's still one continuous live range.
- Add a couple of missing checks for HasRedefByEC in the coalescer. In general, it should not coalesce a vr with a physical register if the physical register has a early clobber def somewhere. This is overly conservative but that's the price for using such a nasty inline asm "feature".
llvm-svn: 90269
|
|
|
|
|
|
|
|
|
| |
copy coalescing.
This means that well connected blocks are copy coalesced before the less connected blocks. Connected blocks are more difficult to
coalesce because intervals are more complicated, so handling them first gives a greater chance of success.
llvm-svn: 90194
|
|
|
|
|
|
| |
Fix debug code that assumes getBasicBlock never returns NULL.
llvm-svn: 89428
|
|
|
|
|
|
|
|
| |
- If destination is a physical register and it has a subreg index, use the
sub-register instead.
This fixes PR5423.
llvm-svn: 88745
|
|
|
|
|
|
|
|
| |
and extract_subreg as a "copy" that defines a valno.
Also fixes a typo. These two issues prevent a simple subreg coalescing from
happening before.
llvm-svn: 86022
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces a new pass, SlotIndexes, which is responsible for numbering
instructions for register allocation (and other clients). SlotIndexes numbering
is designed to match the existing scheme, so this patch should not cause any
changes in the generated code.
For consistency, and to avoid naming confusion, LiveIndex has been renamed
SlotIndex.
The processImplicitDefs method of the LiveIntervals analysis has been moved
into its own pass so that it can be run prior to SlotIndexes. This was
necessary to match the existing numbering scheme.
llvm-svn: 85979
|
|
|
|
|
|
| |
interval.
llvm-svn: 85599
|
|
|
|
| |
llvm-svn: 85514
|
|
|
|
|
|
|
|
| |
--- Reverse-merging r85338 into '.':
U lib/CodeGen/SimpleRegisterCoalescing.cpp
U lib/CodeGen/SimpleRegisterCoalescing.h
llvm-svn: 85454
|
|
|
|
|
|
| |
despite a real interference. This fixes rdar://problem/7157961.
llvm-svn: 85338
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bootstrapping. It's not safe to leave identity subreg_to_reg and insert_subreg
around.
- Relax register scavenging to allow use of partially "not-live" registers. It's
common for targets to operate on registers where the top bits are undef. e.g.
s0 =
d0 = insert_subreg d0<undef>, s0, 1
...
= d0
When the insert_subreg is eliminated by the coalescer, the scavenger used to
complain. The previous fix was to keep to insert_subreg around. But that's
brittle and it's overly conservative when we want to use the scavenger to
allocate registers. It's actually legal and desirable for other instructions
to use the "undef" part of d0. e.g.
s0 =
d0 = insert_subreg d0<undef>, s0, 1
...
s1 =
= s1
= d0
We probably need add a "partial-undef" marker on machine operand so the
machine verifier would not complain.
llvm-svn: 85091
|
|
|
|
|
|
| |
passes delete them. This avoids register scavenger complain.
llvm-svn: 85045
|
|
|
|
|
|
|
|
| |
used elsewhere - an exit block is a block outside the loop branched to
from within the loop. An exiting block is a block inside the loop that
branches out.
llvm-svn: 85019
|
|
|
|
| |
llvm-svn: 84978
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is trivially rematerializable and integrate it into
TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
need to know whether an instruction is rematerializable will get the
same answer.
This enables the useful parts of the aggressive-remat option by
default -- using AliasAnalysis to determine whether a memory location
is invariant, and removes the questionable parts -- rematting operations
with virtual register inputs that may not be live everywhere.
llvm-svn: 83687
|
|
|
|
|
|
|
| |
TargetInstrDesc::isRematerializable flag, so it isn't necessary to do
this check in its callers.
llvm-svn: 83671
|
|
|
|
| |
llvm-svn: 83255
|
|
|
|
| |
llvm-svn: 83254
|
|
|
|
|
|
|
|
|
|
|
| |
physical registers. This is especially critical for the later two since they
start the live interval of a super-register. e.g.
%DO<def> = INSERT_SUBREG %D0<undef>, %S0<kill>, 1
If this instruction is eliminated, the register scavenger will not be happy as
D0 is not defined previously.
This fixes PR5055.
llvm-svn: 82968
|
|
|
|
|
|
| |
kills. This also eliminate the horrible check which scan forward to the end of the basic block. It should be faster and more accurate.
llvm-svn: 82676
|
|
|
|
| |
llvm-svn: 82610
|