Commit d1cc577
authored
JIT: fix count reconstruction when a natural loop contains an improper loop (#100449)
If a natural loop contains an improper loop, the cyclic probability computation
for the natural loop will be an underestimate, as the cyclic probability computation
assumes one pass convergence.
In such cases count reconstruction may report convergence when it has not in
fact converged, as any natural loop header ignores flow from its back edges, assuming
their impact has been accounted for by the cyclic probability.
So when a loop contains improper loops, fall back to normal iterative computation
for the loop. We could use the cyclic probability initially as a convergence
accelerator, but would need to switch over to not using it to guarantee full
convergence. But that complicates the logic and these cases are rare.1 parent fb5e93a commit d1cc577
3 files changed
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2091 | 2091 | | |
2092 | 2092 | | |
2093 | 2093 | | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
2094 | 2097 | | |
2095 | 2098 | | |
2096 | 2099 | | |
| |||
2179 | 2182 | | |
2180 | 2183 | | |
2181 | 2184 | | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
2182 | 2190 | | |
2183 | 2191 | | |
2184 | 2192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1193 | 1193 | | |
1194 | 1194 | | |
1195 | 1195 | | |
1196 | | - | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
1197 | 1199 | | |
1198 | 1200 | | |
1199 | 1201 | | |
1200 | 1202 | | |
1201 | | - | |
| 1203 | + | |
1202 | 1204 | | |
1203 | 1205 | | |
1204 | 1206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4386 | 4386 | | |
4387 | 4387 | | |
4388 | 4388 | | |
| 4389 | + | |
| 4390 | + | |
| 4391 | + | |
| 4392 | + | |
| 4393 | + | |
| 4394 | + | |
| 4395 | + | |
| 4396 | + | |
| 4397 | + | |
4389 | 4398 | | |
4390 | 4399 | | |
4391 | 4400 | | |
| |||
0 commit comments