Commit 4b02a76
committed
[SCEV] Don't perform implication checks with many predicates
When adding a new predicate to a union, we currently do a bidirectional
implication for all the contained predicates. This means that the
number of implication checks is quadratic in the number of total
predicates (if they don't end up being eliminated).
Fix this by not checking for implication if the number of predicates
grows too large. The expectation is that if there is a large number
of predicates, we should be discarding them later anyway, as expanding
them would be too expensive.
(Alternatively we could also try to prevent the addition of many
predicates in the first place, but I figured this is better as it's
centralized in one place.)
Fixes #156114.1 parent fd4ef8e commit 4b02a76
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15176 | 15176 | | |
15177 | 15177 | | |
15178 | 15178 | | |
| 15179 | + | |
| 15180 | + | |
| 15181 | + | |
| 15182 | + | |
| 15183 | + | |
15179 | 15184 | | |
15180 | | - | |
| 15185 | + | |
15181 | 15186 | | |
15182 | 15187 | | |
15183 | 15188 | | |
15184 | 15189 | | |
15185 | 15190 | | |
15186 | 15191 | | |
15187 | | - | |
| 15192 | + | |
15188 | 15193 | | |
15189 | 15194 | | |
15190 | 15195 | | |
| |||
0 commit comments