summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-12-09 15:57:15 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-12-09 15:57:15 +0000
commit2a48433fcf29c943e2fa90aca355fdf477cbe8b6 (patch)
treef0c3dfbb6b471be9207f984fb66fb216edebd18a /llvm/lib/Target
parentbf9c0e7434f7822f823ea60ad0cb05b34bd56e2a (diff)
downloadbcm5719-llvm-2a48433fcf29c943e2fa90aca355fdf477cbe8b6.tar.gz
bcm5719-llvm-2a48433fcf29c943e2fa90aca355fdf477cbe8b6.zip
AMDGPU/SI: Don't mark VINTRP instructions as mayLoad
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 %) Reviewers: nhaehnle, mareko, arsenm Subscribers: kzhuravl, wdng, yaxunl, tony-tye Differential Revision: https://reviews.llvm.org/D27593 llvm-svn: 289219
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AMDGPU/SIInstrFormats.td14
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInstrFormats.td b/llvm/lib/Target/AMDGPU/SIInstrFormats.td
index 5f260ba0c85..16021fff531 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrFormats.td
+++ b/llvm/lib/Target/AMDGPU/SIInstrFormats.td
@@ -229,7 +229,19 @@ let Uses = [EXEC] in {
class VINTRPCommon <dag outs, dag ins, string asm, list<dag> pattern> :
InstSI <outs, ins, asm, pattern> {
- let mayLoad = 1;
+
+ // VINTRP instructions read parameter values from LDS, but these parameter
+ // values are stored outside of the LDS memory that is allocated to the
+ // shader for general purpose use.
+ //
+ // While it may be possible for ds_read/ds_write instructions to access
+ // the parameter values in LDS, this would essentially be an out-of-bounds
+ // memory access which we consider to be undefined behavior.
+ //
+ // So even though these instructions read memory, this memory is outside the
+ // addressable memory space for the shader, and we consider these instructions
+ // to be readnone.
+ let mayLoad = 0;
let mayStore = 0;
let hasSideEffects = 0;
}
OpenPOWER on IntegriCloud