-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize
ValueNumStore::GetVNFunc
(#67395)
`ValueNumStore::GetVNFunc` is very hot, in fact so hot that it shows up right at the top in a profile of SPMI over libraries.pmi, next to `fgMorphSmpOp`. Instead of copying all args just return a pointer to the arguments which allows all the cases to be unified and makes the function small enough for MSVC to inline it. Most of the work here is to make sure we do not end up with undefined behavior. I also removed some of the duplication by using a templated struct for func apps instead of the old VNDefFuncNArg. Windows x64 SPMI over libraries.pmi: PIN before: 329991512865 PIN after: 326098430289 (-1.19%)
- Loading branch information
1 parent
321cec8
commit c3843c5
Showing
4 changed files
with
184 additions
and
240 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
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
Oops, something went wrong.