Skip to content

Commit 5cb30f3

Browse files
add max length mode for dumps (if using custom opt passes) (#1289)
* add max length mode for dumps (if using custom opt passes) * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 8aa8113 commit 5cb30f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mlir/IR/Pass.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ function dump_mlir(
9898
if isempty(mode)
9999
fname *= ".mlir"
100100
else
101+
if length(mode) > 100
102+
mode = mode[1:100]
103+
end
101104
fname *= "_$(mode).mlir"
102105
end
103106
MLIR_DUMP_COUNTER[] += 1

0 commit comments

Comments
 (0)