diff options
author | Mingjie Xu <xumingjie.enna1@bytedance.com> | 2025-09-15 10:28:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-15 10:28:40 +0800 |
commit | 5850c44288cba01c75f8afb7cfcf3a2d47e2d5a4 (patch) | |
tree | 263985517e534cf057932834b9e19cd1dd1670c8 /llvm/unittests/ADT/StringRefTest.cpp | |
parent | fef88d2ef21edc83660968e0134e28dda88d4a11 (diff) | |
download | llvm-5850c44288cba01c75f8afb7cfcf3a2d47e2d5a4.zip llvm-5850c44288cba01c75f8afb7cfcf3a2d47e2d5a4.tar.gz llvm-5850c44288cba01c75f8afb7cfcf3a2d47e2d5a4.tar.bz2 |
[InstCombine] Improve `foldDeadPhiWeb` compile time (#158057)
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.
Diffstat (limited to 'llvm/unittests/ADT/StringRefTest.cpp')
0 files changed, 0 insertions, 0 deletions