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
Implement LLVM layout and lowering for payload variants #408
enhancementA request for a new feature or improvement.feature requestA request for a new feature or functionality.help wantedThe issue requires extra attention or help from others.needs testingIssues that require additional testing or verification.
Tracked by #347. Depends on the typed HIR variant frontend merged in #374 and should build on the typed-HIR backend boundary.
Required contract
Lower each concrete variant instantiation to a deterministic tagged representation containing:
a discriminant;
storage aligned and sized for the largest payload case;
payload field access driven by typed HIR metadata;
no representation overlap with integer enum.
Implement constructor lowering, discriminant tests, payload extraction/binding, exhaustive match control flow, assignment, return, parameters, and nested variants.
ABI boundary
The representation is initially Wave-internal. Existing frontend guards that reject direct extern(c)/export(c) exposure must remain until a stable external ABI is designed. Generic specializations may have different layouts.
Completion criteria
Payload-free and payload-bearing constructors produce valid LLVM IR.
Match lowering reads the tag and binds payloads safely.
Generic, nested, pointer-recursive, copy/assignment, parameter, and return cases are tested.
Layout assertions cover size, alignment, and discriminant stability for x86_64, AArch64, and RV64.
LLVM verification passes and invalid programs fail in the frontend, not by backend panic.
The temporary “variant reached LLVM” guards are removed only for supported paths.
enhancementA request for a new feature or improvement.feature requestA request for a new feature or functionality.help wantedThe issue requires extra attention or help from others.needs testingIssues that require additional testing or verification.
Activity