Commit 5c97397
authored
[SROA] Support load-only promotion with dynamic offset loads (llvm#135609)
If we do load-only promotion, it is okay if we leave some loads alone.
We only need to know all stores that affect a specific location.
As such, we can handle loads with unknown offset via the "escaped
read-only" code path.
This is something we already support in LICM load-only promotion, but
doing this in SROA is much better from a phase ordering perspective.
Fixes llvm#134513.1 parent 1588aab commit 5c97397
File tree
2 files changed
+9
-3
lines changed- llvm
- lib/Transforms/Scalar
- test/Transforms/SROA
2 files changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1114 | 1114 | | |
1115 | 1115 | | |
1116 | 1116 | | |
| 1117 | + | |
| 1118 | + | |
1117 | 1119 | | |
1118 | | - | |
| 1120 | + | |
1119 | 1121 | | |
1120 | 1122 | | |
1121 | 1123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
| 504 | + | |
| 505 | + | |
504 | 506 | | |
505 | 507 | | |
506 | 508 | | |
| |||
509 | 511 | | |
510 | 512 | | |
511 | 513 | | |
512 | | - | |
513 | | - | |
| 514 | + | |
| 515 | + | |
514 | 516 | | |
515 | 517 | | |
516 | 518 | | |
| |||
540 | 542 | | |
541 | 543 | | |
542 | 544 | | |
| 545 | + | |
| 546 | + | |
543 | 547 | | |
544 | 548 | | |
545 | 549 | | |
| |||
0 commit comments