[PATCH] D116610: [ADCE][NFC] Batch DT updates together
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 4 11:30:34 PST 2022
kuhar added a comment.
> This change is NFC but can improve the runtime of the compiler dramatically in some pathological cases (where the pass was pushing a lot (several thousands) of small updates (less than 6)).
> For instance on the motivating example we went from 300+ sec to less than a second.
Nice!
================
Comment at: llvm/lib/Transforms/Scalar/ADCE.cpp:582
bool Changed = false;
+ SmallVector<DominatorTree::UpdateType, 16> DeletedEdges;
----------------
How did you pick this constant?
================
Comment at: llvm/lib/Transforms/Scalar/ADCE.cpp:636
+ if (!DeletedEdges.empty())
+ DomTreeUpdater(DT, &PDT, DomTreeUpdater::UpdateStrategy::Eager)
----------------
How about we move this as an early exit in `DomTreeUpdater::applyUpdates`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116610/new/
https://reviews.llvm.org/D116610
More information about the llvm-commits
mailing list