Commit 75596ac
[NFC][mlir][AsmPrinter] Don't compute resourceStr when --mlir-elide-resource-strings-if-larger=0 (llvm#138275)
When skipping the printing of large DenseResourceElementsAttr with
--mlir-elide-resource-strings-if-larger,
we need to compute resourceStr to check if the string is small enough to
print.
With --mlir-elide-resource-strings-if-larger set to 0, nothing should be
printed, but we still compute the size.
This change will allow an early return when
--mlir-elide-resource-strings-if-larger=0, making the print process
faster.1 parent 6607b2f commit 75596ac
File tree
2 files changed
+14
-0
lines changed- mlir
- lib/IR
- test/IR
2 files changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3463 | 3463 | | |
3464 | 3464 | | |
3465 | 3465 | | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
3466 | 3470 | | |
3467 | 3471 | | |
3468 | 3472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
0 commit comments