Commit 5850c44
authored
[InstCombine] Improve
The foldDeadPhiWeb function identifies and removes small dead PHI webs,
it bails out if the web size exceeds threshold (16).
In the current implementation, when there is a phi node has large number
of users that most of them are phi nodes, we still push them on the
`Stack` even if the number of phi nodes user exceeds the threshold.
This patch checks the early stop condition when we push an unvisited phi
node on the `Stack`.
With this change, the wall duration of total instcombine pass decreased
from 523,649.276 ms to 208,687.042 ms in an our internal case.foldDeadPhiWeb compile time (#158057)1 parent fef88d2 commit 5850c44
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 66 | | |
71 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
0 commit comments