| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
intervals.
This fixes PR7601.
llvm-svn: 107955
|
|
|
|
| |
llvm-svn: 107950
|
|
|
|
|
|
| |
This reverts commit 107921. It broke the clang self host.
llvm-svn: 107926
|
|
|
|
| |
llvm-svn: 107921
|
|
|
|
|
|
|
|
|
| |
EXTRACT_SUBREG no longer appears as a machine instruction. Use COPY instead.
Add isCopy() checks in many places using isMoveInstr() and isExtractSubreg().
The isMoveInstr hook will be removed later.
llvm-svn: 107879
|
|
|
|
|
|
|
| |
Fix X86InstrInfo::convertToThreeAddressWithLEA to generate COPY instead of
INSERT_SUBREG.
llvm-svn: 107878
|
|
|
|
| |
llvm-svn: 107780
|
|
|
|
|
|
| |
Buildbot breakage.
llvm-svn: 107744
|
|
|
|
| |
llvm-svn: 107732
|
|
|
|
| |
llvm-svn: 107700
|
|
|
|
| |
llvm-svn: 107698
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is OK for an alias live range to overlap if there is a copy to or from the
physical register. CoalescerPair can work out if the copy is coalescable
independently of the alias.
This means that we can join with the actual destination interval instead of
using the getOrigDstReg() hack. It is no longer necessary to merge clobber
ranges into subregisters.
llvm-svn: 107695
|
|
|
|
|
|
|
| |
This code is transitional, it will soon be possible to eliminate
isExtractSubreg, isInsertSubreg, and isMoveInstr in most places.
llvm-svn: 107547
|
|
|
|
|
|
| |
SrcReg
llvm-svn: 107234
|
|
|
|
|
|
|
|
|
|
| |
you would expect.
Don't assert on that case, just give up.
This fixes PR7513.
llvm-svn: 107046
|
|
|
|
|
|
|
|
|
|
|
|
| |
The VNInfo.kills vector was almost unused except for all the code keeping it
updated. The few places using it were easily rewritten to check for interval
ends instead.
The two new methods LiveInterval::killedAt and killedInRange are replacements.
This brings us down to 3 independent data structures tracking kills.
llvm-svn: 106905
|
|
|
|
|
|
|
|
|
| |
are dead, not just the def of this register. I.e., a register could be dead, but
it's subreg isn't.
Testcase to follow with a subsequent patch.
llvm-svn: 106878
|
|
|
|
|
|
| |
copies.
llvm-svn: 106780
|
|
|
|
|
|
|
|
|
|
| |
CoalescerPair can determine if a copy can be coalesced, and which register gets
merged away. The old logic in SimpleRegisterCoalescing had evolved into
something a bit too convoluted.
This second attempt fixes some crashes that only occurred Linux.
llvm-svn: 106769
|
|
|
|
|
|
|
|
| |
class."
Whiny buildbots.
llvm-svn: 106710
|
|
|
|
|
|
|
|
| |
CoalescerPair can determine if a copy can be coalesced, and which register gets
merged away. The old logic in SimpleRegisterCoalescing had evolved into
something a bit too convoluted.
llvm-svn: 106701
|
|
|
|
|
|
|
|
|
| |
Measurements show that it does not speed up coalescing, so there is no reason
the keep the added complexity around.
Also clean out some unused methods and static functions.
llvm-svn: 106548
|
|
|
|
|
|
|
|
| |
SimpleRegisterCoalescing::JoinIntervals() uses CoalescerPair to determine if a
copy is coalescable, and in very rare cases it can return true where LHS is not
live - the coalescable copy can come from an alias of the physreg in LHS.
llvm-svn: 106021
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given a copy instruction, CoalescerPair can determine which registers to
coalesce in order to eliminate the copy. It deals with all the subreg fun to
determine a tuple (DstReg, SrcReg, SubIdx) such that:
- SrcReg is a virtual register that will disappear after coalescing.
- DstReg is a virtual or physical register whose live range will be extended.
- SubIdx is 0 when DstReg is a physical register.
- SrcReg can be joined with DstReg:SubIdx.
CoalescerPair::isCoalescable() determines if another copy instruction is
compatible with the same tuple. This fixes some NEON miscompilations where
shuffles are getting coalesced as if they were copies.
The CoalescerPair class will replace a lot of the spaghetti logic in JoinCopy
later.
llvm-svn: 105997
|
|
|
|
|
|
|
|
|
| |
register updates.
These operands tell the spiller that the other parts of the partially defined
register are don't-care, and a reload is not necessary.
llvm-svn: 105361
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instruction defines subregisters.
Any existing subreg indices on the original instruction are preserved or
composed with the new subreg index.
Also substitute multiple operands mentioning the original register by using the
new MachineInstr::substituteRegister() function. This is necessary because there
will soon be <imp-def> operands added to non read-modify-write partial
definitions. This instruction:
%reg1234:foo = FLAP %reg1234<imp-def>
will reMaterialize(%reg3333, bar) like this:
%reg3333:bar-foo = FLAP %reg333:bar<imp-def>
Finally, replace the TargetRegisterInfo pointer argument with a reference to
indicate that it cannot be NULL.
llvm-svn: 105358
|
|
|
|
|
|
|
| |
The comment about ordering of subreg indices is no longer true.
This exposed a bug in the new substVirtReg method that is also fixed.
llvm-svn: 105294
|
|
|
|
| |
llvm-svn: 104574
|
|
|
|
|
|
|
|
|
|
| |
that are aliases of the specified register.
- Rename modifiesRegister to definesRegister since it's looking a def of the
specific register or one of its super-registers. It's not looking for def of a
sub-register or alias that could change the specified register.
- Added modifiesRegister to look for defs of aliases.
llvm-svn: 104377
|
|
|
|
|
|
| |
in the coalescer's instruction map.
llvm-svn: 104086
|
|
|
|
|
|
| |
indices.
llvm-svn: 103450
|
|
|
|
|
|
|
|
|
|
|
| |
with the fix in 103157.
%reg1039:1<def> = VMOVS %S1<kill>, pred:14, pred:%reg0
is not coalescable since none of the super-registers of S1 are in reg1039's
register class: DPR_VFP2. But it is still a legal copy instruction so it should
not assert.
llvm-svn: 103170
|
|
|
|
|
|
|
|
| |
RemoveCopyByCommutingDef().
This fixes PR6941.
llvm-svn: 102970
|
|
|
|
|
|
| |
Rounding differences causes tests to fail on Linux.
llvm-svn: 102729
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of different register classes. e.g.
%reg1048:3<def> = EXTRACT_SUBREG %RAX<kill>, 3
Where %reg1048 is a GR32 register. This is not impossible to handle, but it is
pretty hard and very rare.
This should unbreak the dragonegg builder.
llvm-svn: 102672
|
|
|
|
| |
llvm-svn: 102666
|
|
|
|
| |
llvm-svn: 102663
|
|
|
|
|
|
|
|
|
|
|
| |
update them. Computing kill flags is notoriously difficult, and the coalescer
would get it wrong sometimes, and it would completely skip physical registers.
Now we simply remove kill flags based on the live intervals after coalescing.
This is a few percent slower, but now we get correct kill flags for physical
registers after coalescing.
llvm-svn: 102510
|
|
|
|
| |
llvm-svn: 102027
|
|
|
|
|
|
|
| |
extract_subreg / insert_subreg, etc.
- Add support for more aggressive insert_subreg coalescing.
llvm-svn: 101971
|
|
|
|
|
|
|
|
| |
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
|