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
CUDA_OXIDE currently preserves the distinction between ordinary and wrapping pointer offsets using private LLVM-dialect metadata.
This was introduced in #612 to fix wrapping pointer-offset lowering: ordinary pointer offsets may carry the LLVM inbounds contract, while wrapping raw-pointer offsets must not be emitted as getelementptr inbounds.
At the moment, that distinction is represented in two layers:
MIR keeps mir_ptr_offset_inbounds, which models the Rust-level semantic distinction.
The LLVM dialect carries a private cuda_oxide_gep_inbounds marker consumed by llvm-export.
Pliron now has first-class support for LLVM GEP no-wrap flags through pliron-org/pliron#244:
inbounds
nusw
nuw
canonical inbounds => nusw semantics
GetElementPtrOp::new_with_no_wrap_flags
preservation across LLVM IR conversion
CUDA_OXIDE should adopt that upstream representation and remove the private LLVM-level shim.
Scope
Keep the MIR-level mir_ptr_offset_inbounds marker because it represents Rust source semantics.
Lower ordinary pointer offsets to GEPs carrying GepNoWrapFlags::INBOUNDS.
Lower wrapping pointer offsets to GEPs with no no-wrap flags.
Replace existing production GEP sites that previously relied on CUDA_OXIDE's implicit inbounds behavior with explicit upstream flags.
Keep dynamic shared-memory byte-offset GEPs unflagged: the [0 x i8] declaration does not establish LLVM's allocated-object inbounds contract for non-zero runtime offsets.
Teach llvm-export to emit Pliron's INBOUNDS, NUSW, and NUW flags.
Remove cuda_oxide_gep_inbounds and its associated helpers.
Add regression coverage for the supported flag combinations and pointer-offset semantics.
Acceptance criteria
No remaining uses of the private cuda_oxide_gep_inbounds representation.
Ordinary pointer offsets continue to export as getelementptr inbounds.
Wrapping pointer offsets export as plain getelementptr.
Activity