Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tablegen] Improve performance of -gen-register-info by replacing bar…
…ely-necessary std::map with a sorted vector Summary: This particular map is hardly ever queried and has a phased usage pattern (insert, iterate, query, insert, iterate) so it's a good candidate for a sorted vector and std::lower_bound. This significantly reduces the run time of runTargetDesc() in some circumstances. One llvm-tblgen invocation in my build improves the time spent in runTargetDesc() from 9.86s down to 0.80s (~92%) without changing the output. The same invocation also has 2GB less allocation churn. Reviewers: bogner, rtereshin, aditya_nandakumar, volkan Reviewed By: rtereshin Subscribers: mgrang, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D50272 llvm-svn: 339208
- Loading branch information
1 parent
749e828
commit 944fbb1
Showing
2 changed files
with
64 additions
and
11 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