[all-commits] [llvm/llvm-project] 094c10: [CIR] Lower byval/byref args in CallConvLowering (...
adams381 via All-commits
all-commits at lists.llvm.org
Tue Jun 23 12:29:02 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 094c10f9c6a7ff039c682fd2c5d90f92e2579f1e
https://github.com/llvm/llvm-project/commit/094c10f9c6a7ff039c682fd2c5d90f92e2579f1e
Author: adams381 <adams at nvidia.com>
Date: 2026-06-23 (Tue, 23 Jun 2026)
Changed paths:
M clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
A clang/test/CIR/Transforms/abi-lowering/indirect-byval.cir
Log Message:
-----------
[CIR] Lower byval/byref args in CallConvLowering (#201717)
[CIR] Lower byval/byref args in CallConvLowering
ArgKind::Indirect arguments were hitting an errorNYI in
CIRABIRewriteContext. Add the lowering: in the callee the block argument
type changes to !cir.ptr<T>, a load is inserted at entry so the body sees
the original value type, and llvm.byval or llvm.byref is attached based on
ownership. At call sites, both byval and byref are lowered by allocating a
stack slot, copying the value in, and passing the pointer.
For byval, llvm.noalias and llvm.noundef are also added -- llvm.noalias
because the call-site rewrite always produces a fresh alloca+store
(equivalent to -fpass-by-value-is-noalias), and llvm.noundef because the
copy is always fully defined. byref carries only llvm.byref and llvm.align
since it does not assert exclusive ownership.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list