This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Run SIFoldOperands after PeepholeOptimizer
ClosedPublic

Authored by arsenm on Apr 13 2016, 6:54 PM.

Details

Reviewers
tstellarAMD
Summary

PeepholeOptimizer cleans up redundant copies, which makes
the operand folding more effective.

shader-db stats:

Totals:
SGPRS: 34200 -> 34336 (0.40 %)
VGPRS: 22118 -> 21655 (-2.09 %)
Code Size: 632144 -> 633460 (0.21 %) bytes
LDS: 11 -> 11 (0.00 %) blocks
Scratch: 10240 -> 11264 (10.00 %) bytes per wave
Max Waves: 8822 -> 8918 (1.09 %)
Wait states: 0 -> 0 (0.00 %)

Totals from affected shaders:
SGPRS: 7704 -> 7840 (1.77 %)
VGPRS: 5169 -> 4706 (-8.96 %)
Code Size: 234444 -> 235760 (0.56 %) bytes
LDS: 2 -> 2 (0.00 %) blocks
Scratch: 0 -> 1024 (0.00 %) bytes per wave
Max Waves: 1188 -> 1284 (8.08 %)
Wait states: 0 -> 0 (0.00 %)

Increases:
SGPRS: 35 (0.01 %)
VGPRS: 1 (0.00 %)
Code Size: 59 (0.02 %)
LDS: 0 (0.00 %)
Scratch: 1 (0.00 %)
Max Waves: 48 (0.02 %)
Wait states: 0 (0.00 %)

Decreases:
SGPRS: 26 (0.01 %)
VGPRS: 54 (0.02 %)
Code Size: 68 (0.03 %)
LDS: 0 (0.00 %)
Scratch: 0 (0.00 %)
Max Waves: 4 (0.00 %)
Wait states: 0 (0.00 %)

Diff Detail

Event Timeline

arsenm updated this revision to Diff 53651.Apr 13 2016, 6:54 PM
arsenm retitled this revision from to AMDGPU: Run SIFoldOperands after PeepholeOptimizer.
arsenm updated this object.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
tstellarAMD accepted this revision.Apr 14 2016, 7:21 AM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Apr 14 2016, 7:21 AM
arsenm closed this revision.Apr 14 2016, 3:05 PM

r266378

This commit seems to have caused a few issues and I think might be the root cause of https://bugs.freedesktop.org/show_bug.cgi?id=95528

There has been some investigation into this bug but it hasn't been resolved yet - please can you revert this commit until a solution is found? It clearly causes a regression, or is exposing another bug somewhere else. We're getting closer to the llvm 3.9 release date and it would be nice not to have this issue in 3.9 seeing how infrequent bugfix releases are compared to mesa

FireBurn reopened this revision.Jul 2 2016, 2:49 AM
This revision is now accepted and ready to land.Jul 2 2016, 2:49 AM
mareko added a subscriber: mareko.Jul 4 2016, 10:00 AM

There has been some investigation into this bug but it hasn't been resolved yet - please can you revert this commit until a solution is found? It clearly causes a regression, or is exposing another bug somewhere else. We're getting closer to the llvm 3.9 release date and it would be nice not to have this issue in 3.9 seeing how infrequent bugfix releases are compared to mesa

Does D21961 fix the regression? It does for me.

Yes it does :D the graphical glitches are gone, I was playing at 4k res at high settings but I think the card then overheated, but that is an issue for another day

arsenm closed this revision.Jul 5 2016, 11:37 AM