This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Don't mark VINTRP instructions as mayLoad
ClosedPublic

Authored by tstellarAMD on Dec 8 2016, 2:04 PM.

Details

Summary

These instructions technically do read from memory, but the memory
is considered to be out of bounds for normal load/store instructions.

shader-db stats:

SGPRS: 1416075 -> 1413323 (-0.19 %)
VGPRS: 867413 -> 863935 (-0.40 %)
Spilled SGPRs: 1409 -> 1354 (-3.90 %)
Spilled VGPRs: 63 -> 63 (0.00 %)
Private memory VGPRs: 880 -> 880 (0.00 %)
Scratch size: 2648 -> 2632 (-0.60 %) dwords per thread
Code Size: 37889052 -> 37897340 (0.02 %) bytes
LDS: 2147 -> 2147 (0.00 %) blocks
Max Waves: 279243 -> 280369 (0.40 %)
Wait states: 0 -> 0 (0.00 %)

Event Timeline

tstellarAMD retitled this revision from to AMDGPU/SI: Don't mark VINTRP instructions as mayLoad.
tstellarAMD updated this object.
arsenm edited edge metadata.Dec 8 2016, 2:10 PM

what about adding a readonly mem operand?

mareko edited edge metadata.Dec 8 2016, 2:27 PM

The portion of LDS dedicated to VINTRP instructions is read-only immutable memory. LDS instruction can't access it, because the VINTRP portion of LDS memory is stolen from the shader. I don't see a reason to mark VINTRP as read-only memory instructions.

what about adding a readonly mem operand?

I considered doing that, but I couldn't think of any advantage of doing it that way.

arsenm accepted this revision.Dec 8 2016, 9:57 PM
arsenm edited edge metadata.

LGTM

This revision is now accepted and ready to land.Dec 8 2016, 9:57 PM
This revision was automatically updated to reflect the committed changes.