[all-commits] [llvm/llvm-project] 51eee2: [CIR] Lower byval/byref args in CallConvLowering
adams381 via All-commits
all-commits at lists.llvm.org
Tue Jun 23 11:24:42 PDT 2026
Branch: refs/heads/users/adams381/cir-callconv-lowering-byval
Home: https://github.com/llvm/llvm-project
Commit: 51eee20a73c9ecc101f778a2bb7f87481652c1ad
https://github.com/llvm/llvm-project/commit/51eee20a73c9ecc101f778a2bb7f87481652c1ad
Author: Adam Smith <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
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