[all-commits] [llvm/llvm-project] 229e42: [mlir][tosa] Handle function declarations in tosa ...
Jiaqi He via All-commits
all-commits at lists.llvm.org
Wed Jun 24 07:57:54 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 229e42155579d191ce114d1e067a2a05aba564e3
https://github.com/llvm/llvm-project/commit/229e42155579d191ce114d1e067a2a05aba564e3
Author: Jiaqi He <heturing at gmail.com>
Date: 2026-06-24 (Wed, 24 Jun 2026)
Changed paths:
M mlir/lib/Dialect/Tosa/Transforms/TosaInputShape.cpp
M mlir/test/Dialect/Tosa/tosa-input-shape.mlir
Log Message:
-----------
[mlir][tosa] Handle function declarations in tosa input shape pass (#205359)
Fixes https://github.com/llvm/llvm-project/issues/205063.
The `tosa-experimental-input-shape` pass currently does not handle
function declarations correctly. The pass may run on declarations, but
the current implementation assumes that every function has a body and
unconditionally accesses the entry block and the last block when
updating argument and result types.
This patch checks whether the function has a body before accessing body
blocks. For declarations, the pass updates the function signature input
types and preserves the original result types, since there is no return
operation from which result types can be inferred.
A regression test is added for the declaration case.
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