Commit 713e403
committed
[opt-remark] Teach opt-remark how to emit remarks for retain/release of @_emptyArrayStorage.
This just involved teaching opt-remark-gen how to pattern match the following
SIL:
```
%0 = global_addr @_swiftEmptyArrayStorage : $*_SwiftEmptyArrayStorage
%1 = address_to_pointer %0 : $*_SwiftEmptyArrayStorage to $Builtin.RawPointer
%2 = raw_pointer_to_ref %1 : $Builtin.RawPointer to $__EmptyArrayStorage
```
Now we produce the following remark:
```
./swift/test/SILOptimizer/opt_remark/opt_remark_generator.sil:105:3: remark: retain of type 'EmptyArrayStorage'
strong_retain %2 : $EmptyArrayStorage // expected-remark {{retain of type 'EmptyArrayStorage'}}
^
./swift/test/SILOptimizer/opt_remark/opt_remark_generator.sil:42:5: note: of 'swiftEmptyArrayStorage'
var swiftEmptyArrayStorage: _SwiftEmptyArrayStorage
^
```1 parent 3602f1a commit 713e403
File tree
2 files changed
+48
-0
lines changed- lib/SILOptimizer/Transforms
- test/SILOptimizer/opt_remark
2 files changed
+48
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
374 | 376 | | |
375 | 377 | | |
376 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
377 | 403 | | |
378 | 404 | | |
379 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
| |||
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
0 commit comments