| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
restrictive register class.
llvm-svn: 62837
|
|
|
|
| |
llvm-svn: 62832
|
|
|
|
|
|
| |
sub-register indices as well.
llvm-svn: 62600
|
|
|
|
| |
llvm-svn: 62573
|
|
|
|
| |
llvm-svn: 62178
|
|
|
|
| |
llvm-svn: 62151
|
|
|
|
|
|
| |
physical register, it's not necessarily defined by a copy. We have to watch out it doesn't clobber any sub-register that might be live during its live interval. If the live interval crosses a basic block, then it's not safe to check with the less conservative check (by scanning uses and defs) because it's possible a sub-register might be live out of the block.
llvm-svn: 62144
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
any of the physical register's sub-register live intervals overlaps with the virtual register. This is overly conservative. It prevents a extract_subreg from being coalesced away:
v1024 = EDI // not killed
=
= EDI
One possible solution is for the coalescer to examine the sub-register live intervals in the same manner as the physical register. Another possibility is to examine defs and uses (when needed) of sub-registers. Both solutions are too expensive. For now, look for "short virtual intervals" and scan instructions to look for conflict instead.
This is a small win on x86-64. e.g. It shaves 403.gcc by ~80 instructions.
llvm-svn: 61847
|
|
|
|
| |
llvm-svn: 61707
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this.
172 %ECX<def> = MOV32rr %reg1039<kill>
180 INLINEASM <es:subl $5,$1
sbbl $3,$0>, 10, %EAX<def>, 14, %ECX<earlyclobber,def>, 9, %EAX<kill>,
36, <fi#0>, 1, %reg0, 0, 9, %ECX<kill>, 36, <fi#1>, 1, %reg0, 0
188 %EAX<def> = MOV32rr %EAX<kill>
196 %ECX<def> = MOV32rr %ECX<kill>
204 %ECX<def> = MOV32rr %ECX<kill>
212 %EAX<def> = MOV32rr %EAX<kill>
220 %EAX<def> = MOV32rr %EAX
228 %reg1039<def> = MOV32rr %ECX<kill>
The early clobber operand ties ECX input to the ECX def.
The live interval of ECX is represented as this:
%reg20,inf = [46,47:1)[174,230:0) 0@174-(230) 1@46-(47)
The right way to represent this is something like
%reg20,inf = [46,47:2)[174,182:1)[181:230:0) 0@174-(182) 1@181-230 @2@46-(47)
Of course that won't work since that means overlapping live ranges defined by two val#.
The workaround for now is to add a bit to val# which says the val# is redefined by a early clobber def somewhere. This prevents the move at 228 from being optimized away by SimpleRegisterCoalescing::AdjustCopiesBackFrom.
llvm-svn: 61259
|
|
|
|
| |
llvm-svn: 61238
|
|
|
|
| |
llvm-svn: 58294
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the copy instruction from the instruction list before asking the
target to create the new instruction. This gets the old instruction
out of the way so that it doesn't interfere with the target's
rematerialization code. In the case of x86, this helps it find
more cases where EFLAGS is not live.
Also, in the X86InstrInfo.cpp, teach isSafeToClobberEFLAGS to check
to see if it reached the end of the block after scanning each
instruction, instead of just before. This lets it notice when the
end of the block is only two instructions away, without doing any
additional scanning.
These changes allow rematerialization to clobber EFLAGS in more
cases, for example using xor instead of mov to set the return value
to zero in the included testcase.
llvm-svn: 57872
|
|
|
|
|
|
| |
for a copy instruction. PR2775.
llvm-svn: 57458
|
|
|
|
| |
llvm-svn: 57388
|
|
|
|
| |
llvm-svn: 57259
|
|
|
|
|
|
| |
isReg, etc., from isRegister, etc.
llvm-svn: 57006
|
|
|
|
| |
llvm-svn: 56848
|
|
|
|
|
|
|
|
|
|
| |
"If a re-materializable instruction has a register
operand, the spiller will change the register operand's
spill weight to HUGE_VAL to avoid it being spilled.
However, if the operand is already in the queue ready
to be spilled, avoid re-materializing it".
llvm-svn: 56837
|
|
|
|
|
|
| |
change the register operand's spill weight to HUGE_VAL to avoid it being spilled. However, if the operand is already in the queue ready to be spilled, avoid re-materializing it.
llvm-svn: 56835
|
|
|
|
|
|
|
|
|
|
| |
RA problem by expanding the live interval of an
earlyclobber def back one slot. Remove
overlap-earlyclobber throughout. Remove
earlyclobber bits and their handling from
live internals.
llvm-svn: 56539
|
|
|
|
| |
llvm-svn: 56469
|
|
|
|
|
|
| |
Check bits for preferred register.
llvm-svn: 56384
|
|
|
|
| |
llvm-svn: 56372
|
|
|
|
| |
llvm-svn: 56352
|
|
|
|
| |
llvm-svn: 56287
|
|
|
|
|
|
| |
fix 56165 - do not mark val# copy field if the copy does not define the val#.
llvm-svn: 56199
|
|
|
|
|
|
|
|
|
| |
isImmediate(), isRegister(), and friends, to avoid confusion
about having two different names with the same meaning. I'm
not attached to the longer names, and would be ok with
changing to the shorter names if others prefer it.
llvm-svn: 56189
|
|
|
|
|
|
|
|
|
|
|
|
| |
of coalescing. e.g.
vr2 = OR vr0, vr1
=>
vr2 = OR vr1, vr1 // after coalescing vr0 with vr1
Update the value# of the destination register with the copy instruction if that happens.
llvm-svn: 56165
|
|
|
|
|
|
|
|
|
|
|
| |
would create illegal extract_subreg. e.g.
vr1024 = extract_subreg vr1025, 1
...
vr1024 = mov8rr AH
If vr1024 is coalesced with AH, the extract_subreg is now illegal since AH does not have a super-reg whose sub-register 1 is AH.
llvm-svn: 56118
|
|
|
|
|
|
| |
check.
llvm-svn: 56112
|
|
|
|
|
|
|
|
| |
before trying to manipulate it. This
was exposed by fast isel's handling of shifts on X86-64. With this, FreeBench/pcompress2 passes on X86-64 in fast isel.
llvm-svn: 56067
|
|
|
|
| |
llvm-svn: 56037
|
|
|
|
| |
llvm-svn: 56019
|
|
|
|
|
|
| |
the implicit defs onto the remat'ed instruction.
llvm-svn: 55564
|
|
|
|
|
|
| |
Benchmarks/sim/sim, and others on x86-64.
llvm-svn: 55475
|
|
|
|
|
|
| |
Re-materialize the src to replace the copy.
llvm-svn: 55467
|
|
|
|
|
|
| |
had to be propoagated down into all the targets and up into all clients of this API.
llvm-svn: 54802
|
|
|
|
| |
llvm-svn: 54780
|
|
|
|
|
|
|
|
| |
the r2iMap_ by value. This will prevent references to them from being invalidated
if the map is changed.
llvm-svn: 54763
|
|
|
|
| |
llvm-svn: 54347
|
|
|
|
|
|
| |
has been extended due to coalescing.
llvm-svn: 54346
|
|
|
|
|
|
|
|
|
| |
forgot
to multiply the instruction count by a constant factor in a few places, which
caused the register allocator to require many more iterations.
llvm-svn: 53959
|
|
|
|
|
|
|
| |
live intervals itself to use an instruction count approximation that is
not affected by inserting empty indices.
llvm-svn: 53937
|
|
|
|
|
|
| |
since it's less precise.
llvm-svn: 53734
|
|
|
|
|
|
| |
instruction in the block.
llvm-svn: 52649
|
|
|
|
| |
llvm-svn: 52572
|
|
|
|
|
|
| |
X86::MOV16to16_.
llvm-svn: 52480
|
|
|
|
|
|
| |
that are not affected.
llvm-svn: 52430
|
|
|
|
|
|
| |
iterators.
llvm-svn: 51790
|