From c5cedb39b30e2c345fb507ca8f97464e78677d7d Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 25 Nov 2026 13:12:01 -0800 Subject: [PATCH] Landing note: AIR 1.8's pre-LLVM-4 records, read as LLVM 23.1.2 reads them, compile the launcher's library No code change. This commit carries what the reader change (be0718e716) and its fix (d8e42b5e8c) were verified by, since published history is not amended. - The six forms (METADATA_STRING_OLD, METADATA_KIND in the METADATA block, METADATA_OLD_NODE, INBOUNDS_GEP_OLD, and LOAD and CALL without their types) follow LLVM's reader at llvmorg-23.1.2. Its BitcodeReader.cpp and MetadataLoader.cpp are byte-identical to llvmorg-23.1.5's, the release of the llvm-dis and llvm-as the differential used. - The real file (the guest's library, which stays on our hosts), job m3-max-73898 on um870 at d8e42b5e8c, release CLI, runtime-floor profile: each of the 7 modules alone passes the reader (f0 and f1, the vertex functions, compile; f2 to f6 get the CLI's "fragment compiles in a render pipeline" usage answer). The 6 pipelines Metal makes (f0+f2, f1+f2 to f1+f6) compile and spirv-val accepts them, as it does f0 and f1 alone. The 4 pairs Metal refuses (f0+f3 to f0+f6) are refused as UnmatchedVarying, as Metal refuses them for a fragment input the vertex function does not write. Every run takes under 0.01 s and peaks at 15 MiB. The largest public fixture (engine/wps_shuffles.ll, 10 kernels) takes 0.01 to 0.02 s per kernel and peaks at 17 to 18 MiB. - The differential, the same job m3-max-73898: each module rewritten by llvm-dis of 23.1.5, then read by the existing path through llvm-as (llvm-link joining a pair's two modules), gives word for word the SPIR-V of the new reader: f0 and f1 alone and the 6 pipelines. The 4 refused pairs are refused both ways. - The ABI check against Metal's reflection on the M3 (job m3-max-73835): the 6 pipelines' bindings are equal in stage, kind, index, access, texture type and data type, and sampler. Today's rule, not this change's: a buffer slot's window is the byte range the shader can touch, not the declared size, so f2's buffer 0 reads 16 B where Metal reflects the 48 B struct.