[Mlir-commits] [clang] [mlir] [CIR][mlir][ABI] Add IndirectAliased (byref) argument lowering (PR #230415)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Nov 2 22:59:12 PST 2026
================
@@ -290,6 +321,16 @@ mlir::ArrayAttr updateArgAttrs(mlir::MLIRContext *ctx,
dl.getTypeSize(pointeeTy).getFixedValue()));
}
newArgAttrs.push_back(attrs.getDictionary(ctx));
+ } else if (ac.kind == ArgKind::IndirectAliased) {
+ // llvm.byref(T) records the pre-rewrite arg type, as llvm.byval does.
+ mlir::NamedAttrList attrs(existing);
+ attrs.set(mlir::LLVM::LLVMDialect::getAlignAttrName(),
+ builder.getI64IntegerAttr(ac.indirectAlign.value()));
+ attrs.set(mlir::LLVM::LLVMDialect::getNoUndefAttrName(),
----------------
skc7 wrote:
Rebased on latest main and gated `noundef` on `enableNoundefAttrs`.
https://github.com/llvm/llvm-project/pull/230415
More information about the Mlir-commits
mailing list