You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support packed aggregates passed by value across the kernel ABI #940
IR-loweringLowering between dialects (dialect-mir to LLVM dialect)bugSomething isn't workingcodegenDevice code-generation pipeline (Rust MIR to IR to PTX)
Packed aggregates passed or returned by value are currently rejected because their physical rustc layout cannot be represented faithfully by an ordinary LLVM struct.
These layouts cannot be represented faithfully by ordinary LLVM structs.
The expected LLVM representations are:
<{ i8, i32 }>
<{ i8, [1 x i8], i32 }>
respectively.
There is an additional ABI complication for repr(C, packed(2)): an LLVM packed struct has natural alignment 1, while the Rust ABI alignment of the aggregate is 2. That alignment must therefore be preserved separately when the aggregate crosses the kernel parameter ABI.
Scope
Add support for packed aggregates passed by value, including:
construction of packed aggregate SSA values;
whole-value loads and stores;
packed aggregate array stride;
kernel parameters passed by value;
device-function aggregate arguments and returns;
explicit padding required by repr(packed(N));
preservation of source ABI alignment at NVVM kernel boundaries.
Packed aggregates containing target-dependent shared-memory pointers should remain fail-closed until their physical representation is target-independent.
This should not change the existing packed field-addressing behavior.
IR-loweringLowering between dialects (dialect-mir to LLVM dialect)bugSomething isn't workingcodegenDevice code-generation pipeline (Rust MIR to IR to PTX)
Activity