-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace custom written DFS walk with depth first iterator
Summary: GenericDomTreeConstruction had its own written DFS walk. It is basically identical to the DFS walk df_* is doing in the iterators. the one difference is that df_iterator uses an internal visited set. The GenericDomTreeConstruction one reused a field in an existing densemap lookup. Time-wise, this way is actually more cache-friendly (the previous way has a random store into a successor's info, the new way does that store at the same time and in the same place as other stores to the same info) It costs some very small amount of memory to do this, and one we pay in some other part of dom tree construction *anyway*, so we aren't really increasing dom tree constructions's peak memory usage. It could still be changed to use the old field with a little work on df_ext_* if we care (and if someone find performance regressions) Reviewers: chandlerc Reviewed By: chandlerc Subscribers: Eugene.Zelenko, llvm-commits Differential Revision: https://reviews.llvm.org/D8932 llvm-svn: 294339
- Loading branch information
Showing
2 changed files
with
70 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters