[all-commits] [llvm/llvm-project] a20b2d: [mlir][LLVM] Disallow opaque struct types as funct...
Markus Böck via All-commits
all-commits at lists.llvm.org
Sat Mar 7 08:23:24 PST 2026
Branch: refs/heads/users/zero9178/llvm-func-struct
Home: https://github.com/llvm/llvm-project
Commit: a20b2dbcd33583c1cb8abd40c56cda6a0d5d9935
https://github.com/llvm/llvm-project/commit/a20b2dbcd33583c1cb8abd40c56cda6a0d5d9935
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2026-03-07 (Sat, 07 Mar 2026)
Changed paths:
M mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
M mlir/test/Dialect/LLVMIR/types-invalid.mlir
Log Message:
-----------
[mlir][LLVM] Disallow opaque struct types as function arguments
Function types are only allowed to take first-class values as arguments.
The LLVM dialect implemented this correctly so far except for allowing opaque struct types.
When translated to LLVM proper, invalid IR would be created with confusing assertion errors.
This PR matches LLVM by disallowing opaque struct types as arguments, allowing users to catch this kind of mistake early while still in the MLIR world.
The corresponding LLVM logic is here: https://github.com/llvm/llvm-project/blob/c4898f3f229027e6cbdf8f9db77b8c14d70f6599/llvm/lib/IR/Type.cpp#L404
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