Repository navigation
Description
Summary
Update cuda-oxide to the Pliron API where LLVM StructType explicitly carries a
StructLayout.
This is a dependency/API migration required before cuda-oxide can consume packed
LLVM struct support. It should remain behavior-neutral with respect to packed
Rust aggregates.
Motivation
pliron-org/pliron#232 changes the LLVM struct type API so that struct layout is
represented explicitly as either StructLayout::Unpacked or
StructLayout::Packed.
cuda-oxide currently constructs and rebuilds LLVM structs in several lowering
and transformation paths. After updating Pliron, these sites must either:
- explicitly select
StructLayout::Unpackedwhen constructing a new synthetic
LLVM struct, or - preserve the existing layout when rebuilding an existing LLVM struct.
Without this migration, cuda-oxide cannot update to the Pliron revision that
provides packed struct representation.
Proposed work
- Update
pliron,pliron-derive, andpliron-llvmto the new Pliron API. - Update
StructTypeconstruction sites to pass an explicit layout. - Preserve
StructType::layout()in transformations that rebuild existing
structs. - Update generated intrinsic code and its source generator consistently.
- Adapt other Pliron 0.17 API changes required by the dependency update.
- Update lockfiles and dependency-license metadata.
Non-goals
This issue does not enable packed aggregate lowering in cuda-oxide.
In particular, this change should not:
- select
StructLayout::Packedfor cuda-oxide-generated types, - change
repr(C, packed)by-value behavior, - change kernel ABI lowering,
- remove existing fail-closed checks for layout-divergent aggregates,
- change packed field-addressing behavior,
- change LLVM packed-struct emission.
Packed aggregate representation and ABI support should be implemented separately
once this migration is complete.
Acceptance criteria
- All newly constructed synthetic LLVM structs explicitly use
StructLayout::Unpacked. - Transformations rebuilding existing LLVM structs preserve their original
StructLayout. - No cuda-oxide code selects
StructLayout::Packed. - Generated intrinsic sources remain reproducible from the generator.
- Existing packed aggregate fail-closed behavior remains unchanged.
- Formatting, Clippy, tests, docs, intrinsic probes, ABI-history checks, and
repository guards pass, except for source-policy checks that cannot accept a
temporary contributor-fork dependency while the upstream Pliron change is
still under review.
Dependency
Blocked on pliron-org/pliron#232.
While that PR is under review, development may temporarily use the corresponding
contributor-fork revision. Before this issue is considered complete, the
dependency must be switched back to pliron-org/pliron at the resulting
upstream revision and the full dependency source-policy checks must pass.
Activity