Commit 03cef62
authored
[flang][NFC] turn (h)fir.declare side effect into debug ressource alloca (llvm#113321)
See https://reviews.llvm.org/D157626 for the rational of declare having
side effects.
The write effect is to scary for passes that look for read/write effects
without caring about the resource affected. I know Slava asked for it,
but I think the creation of the `DebuggingResource` was enough and that
a write is too much. The alloca effect is sufficient to prevent DCE to
remove it, which is all we care about currently.
This currently is flag as a reason for creating LHS temporary in
assignment to vector subscripted entity with array constructor.
There is a lot of read/write side effect analysis in the
"lower-hlfir-ordered-assignments" pass, and I feel like we will just
keep adding weird "debug ressource" bypassing here and there with these
side effects.1 parent d89c1db commit 03cef62
File tree
2 files changed
+2
-2
lines changed- flang/include/flang/Optimizer
- Dialect
- HLFIR
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3078 | 3078 | | |
3079 | 3079 | | |
3080 | 3080 | | |
3081 | | - | |
| 3081 | + | |
3082 | 3082 | | |
3083 | 3083 | | |
3084 | 3084 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments