upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/thread_stacks.cpp
diff options
context:
space:
mode:
authormrp1no <137657338+mrp1no@users.noreply.github.com>2026-11-23 04:07:13 +0100
committermrp1no <137657338+mrp1no@users.noreply.github.com>2026-11-23 04:07:13 +0100
commit7c2d977727bb3979b79d0d7ed4d9b2780e4a2873 (patch)
tree90cf7e554e66921c72e0916ea4562b5f7c7207a2 /runtime/src/thread_stacks.cpp
parentd0835dd9f9ec0a88faee510126436f2427854c2e (diff)
rdna2spirv: the heap base is built once in the entry block, not at every memory access
Gen.host_addr loaded push-constant words 1 and 2, widened them, shifted and or-ed them at every s_load, s_buffer_load, buffer and global access: six instructions each time for a value that can't change during the invocation. %main's entry block now builds %heap_base once (HEAP_BASE_ENTRY, next to the access chains it loads through), and host_addr adds to it. The entry block dominates every block of %main, and host_addr is only called for %main's body (the access chains it loads through were already local to %main). The interpreters in test_scalar_mem_smem.py and test_global_mem_offset.py run the body alone, so they read %heap_base as the heap base they set, in place of the two loads they modelled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions