Repository navigation
Conversation
Signed-off-by: Raul Estrada <raulestradaa@gmail.com>
f210339 to
818c88d
Compare
|
The nested and array cases this adds read and write with the wrong alignment, and the kernel faults:
To land this: stamp every carrier projection with the alignment it really has (gcd of the root alignment and the byte offset, 8-byte carrier stride for array elements); unit tests asserting |
nihalpasham
left a comment
There was a problem hiding this comment.
Reviewed 818c88dc: changes requested. The landing list is in #1330 (comment).
…d-as3-local-projections
Signed-off-by: Raul Estrada <raulestradaa@gmail.com>
|
Addressed the requested changes in 3ea241f after merging main.
The branch is ready for CI vetting and re-review. |
Fixes #1094
Summary
Extend the packed-AS3 carrier-local contract introduced by #1327 to support:
The implementation preserves #1327's closed-world model: the complete MIR address-use graph is validated before dialect conversion, and lowering-private physical type facts are attached only after the whole graph succeeds.
Carrier identity is never reconstructed from LLVM defining operations,
OperandsInfo, or converted GEP history.Representation and projection contract
Semantic values retain AS3 pointers while compiler-owned local storage uses the target-stable generic-pointer carrier:
Conversions remain explicit at load/store boundaries.
The verified address graph now admits:
Each projection derives its physical pointee from the already-proven parent carrier type.
mir.field_addrsupports recursive struct/tuple projections, andmir.array_element_addruses the verified physical carrier element type. Ordinary non-carrier addressing is unchanged.Bounds and fail-closed behavior
The existing 16-leaf array rewrite budget is reused. Local-storage shape admission remains independently classified, so future internal-ABI shape widening cannot implicitly widen carrier-local support.
Carrier addresses still fail closed across:
AS3 pointer vectors and arbitrary packed-AS3 memory remain unsupported.
Tests
Added focused coverage for:
packed_aggregate_abinow exercises multiple direct leaves, nested structs, nested tuples, and bounded AS3 pointer arrays through carrier-local projections.Validation
Results:
Both optimized and
CUDA_OXIDE_NO_OPT=1packed_aggregate_abiexecutions pass.addressof_sharedarrayalso continues to pass.Out of scope
This PR does not add carrier-address transport through calls, block arguments, casts, returns, or arbitrary pointer arithmetic, nor support for AS3 pointer vectors, arbitrary/device-global/kernel-entry packed-AS3 carrier storage, or AS3-containing enum locals.