| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will simplify the SGPR spilling and also allow us to use
MachineFrameInfo for calculating offsets, which should be more
reliable than our custom code.
This fixes a crash in some cases where a register would be spilled
in a branch such that the VGPR defined for spilling did not dominate
all the uses when restoring.
This fixes a crash in an ocl conformance test. The test requries
register spilling and is too big to include.
llvm-svn: 216217
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ordinarily (shl (add x, c1), c2) -> (add (shl x, c2), c1 << c2)
is only done if the add has one use. If the resulting constant
add can be folded into an addressing mode, force this to happen
for the pointer operand.
This ends up happening a lot because of how LDS objects are allocated.
Since the globals are allocated next to each other, acessing the first
element of the second object is directly indexed by a shifted pointer.
llvm-svn: 215739
|
|
|
|
| |
llvm-svn: 215406
|
|
|
|
|
|
|
| |
This saves us from having to copy a 64-bit 0 value into VGPRs for
BUFFER_* instruction which only have a 12-bit immediate offset.
llvm-svn: 215399
|
|
|
|
|
|
|
|
| |
This currently has a noticable effect on the kernel argument loads.
LDS and global loads are more problematic, I think because of how copies
are currently inserted to ensure that the address is a VGPR.
llvm-svn: 214942
|
|
|
|
|
|
|
|
|
|
| |
Abs/neg folding has moved out of foldOperands and into the instruction
selection phase using complex patterns. As a consequence of this
change, we now prefer to select the 64-bit encoding for most
instructions and the modifier operands have been dropped from
integer VOP3 instructions.
llvm-svn: 214467
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were incorrectly assuming that all VOP2 instructions can read SGPRs
in Src0, but this is not true for instructions that read carry-in from
VCC.
The old logic has been replaced with new logic which checks the defined
register classes of the VOP2 instruction to determine whether or not to
legalize the operands.
llvm-svn: 214465
|
|
|
|
|
|
|
| |
This will prevent us from using extra MOV instructions once we prefer
selecting 64-bit instructions.
llvm-svn: 214464
|
|
|
|
|
|
|
|
| |
We were commuting the instruction by still shrinking it using the
original opcode.
NOTE: This is a candidate for the 3.5 branch.
llvm-svn: 214463
|
|
|
|
|
|
|
|
|
| |
We can treat ds_read2_* as a single offset if the offsets are adjacent.
No test since emission of read2 instructions for partially
aligned loads isn't implemented yet.
llvm-svn: 214269
|
|
|
|
| |
llvm-svn: 214225
|
|
|
|
|
|
| |
Also add missing comments about how the flags work.
llvm-svn: 214195
|
|
|
|
| |
llvm-svn: 214147
|
|
|
|
|
|
| |
All the others use bool, so these should too.
llvm-svn: 214106
|
|
|
|
|
|
| |
This pass converts 64-bit instructions to 32-bit when possible.
llvm-svn: 213561
|
|
|
|
| |
llvm-svn: 213551
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements a solution for constant initializers suggested
by Vadim Girlin, where we store the data after the shader code
and then use the S_GETPC instruction to compute its address.
This saves use the trouble of creating a new buffer for constant data
and then having to pass the pointer to the kernel via user SGPRs or the
input buffer.
llvm-svn: 213530
|
|
|
|
| |
llvm-svn: 212214
|
|
|
|
| |
llvm-svn: 211524
|
|
|
|
| |
llvm-svn: 211187
|
|
|
|
| |
llvm-svn: 211116
|
|
|
|
| |
llvm-svn: 211115
|
|
|
|
| |
llvm-svn: 210869
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I can't get VGPR spilling to work reliable, so for now just emit
an error when the register allocator tries to spill VGPRs.
v2:
- Fix build
v3:
- Added crash fix when spilling SPGRs
v4:
- Use V_MOV_B32 as a dummy instruction instead of S_NOP
Patch by: Darren Powell
https://bugs.freedesktop.org/show_bug.cgi?id=75276
llvm-svn: 210588
|
|
|
|
|
|
|
|
|
|
|
| |
We need to make sure only one new instruction is added when spilling
otherwise the register allocator may crash.
This fixes a crash in the game Antichamber.
https://bugs.freedesktop.org/show_bug.cgi?id=75276
llvm-svn: 210587
|
|
|
|
| |
llvm-svn: 210568
|
|
|
|
| |
llvm-svn: 210567
|
|
|
|
| |
llvm-svn: 210476
|
|
|
|
| |
llvm-svn: 210135
|
|
|
|
|
|
| |
This prevents a future commit from regressing the load-i1.ll test.
llvm-svn: 208887
|
|
|
|
|
|
| |
This was broken by r208479
llvm-svn: 208740
|
|
|
|
| |
llvm-svn: 208479
|
|
|
|
| |
llvm-svn: 208432
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The register spiller assumes that only one new instruction is created
when spilling and restoring registers, so we need to emit pseudo
instructions for vector register spills and lower them after
register allocation.
v2:
- Fix calculation of lane index
- Extend VGPR liveness to end of program.
v3:
- Use SIMM16 field of S_NOP to specify multiple NOPs.
https://bugs.freedesktop.org/show_bug.cgi?id=75005
llvm-svn: 207843
|
|
|
|
| |
llvm-svn: 207660
|
|
|
|
| |
llvm-svn: 207197
|
|
|
|
|
|
|
|
| |
Use scalar BFE with constant shift and offset when possible.
This is complicated by the fact that the scalar version packs
the two operands of the vector version into one.
llvm-svn: 206558
|
|
|
|
| |
llvm-svn: 206547
|
|
|
|
| |
llvm-svn: 206498
|
|
|
|
|
|
| |
Otherwise we may not legalize some illegal REG_SEQUENCE instructions.
llvm-svn: 206497
|
|
|
|
|
|
|
| |
Better match what is done for VOPC to eventually
prefer selecting these.
llvm-svn: 206048
|
|
|
|
| |
llvm-svn: 205837
|
|
|
|
| |
llvm-svn: 205732
|
|
|
|
| |
llvm-svn: 205244
|
|
|
|
| |
llvm-svn: 205188
|
|
|
|
|
|
|
| |
Check the register class of each operand individually
to avoid an extra copy to a vgpr.
llvm-svn: 204662
|
|
|
|
|
|
|
| |
No longer asserts, but now you get moves loading legal immediates
into the split 32-bit operations.
llvm-svn: 204661
|
|
|
|
|
|
|
|
| |
Try to match scalar and first like the other instructions.
Expand 64-bit ands to a pair of 32-bit ands since that is not
available on the VALU.
llvm-svn: 204660
|
|
|
|
| |
llvm-svn: 204651
|
|
|
|
| |
llvm-svn: 204618
|