-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SSAIR: improve inlining performance with in-place IR-inflation
This commit improves the performance of a huge hot-spot within `inflate_ir` by using the in-place version of it (`inflate_ir!`) and avoiding some unnecessary allocations. For `NativeInterpreter`, `CodeInfo`-IR passed to `inflate_ir` can come from two ways: 1. from global cache: uncompressed from compressed format 2. from local cache: inferred `CodeInfo` as-is managed by `InferenceResult` And in the case of 1, an uncompressed `CodeInfo` is an newly-allocated object already and thus we can use the in-place version safely. And it turns out that this helps us avoid many unnecessary allocations. The original non-destructive `inflate_ir` remains there for testing or interactive purpose.
- Loading branch information
Showing
2 changed files
with
65 additions
and
41 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