-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve scalability of LowerAllocObject
Summary: `LowerAllocObject` can encounter poor performance when the program contains basic blocks with a large number of object literals. This is because for each object allocation, it does a pass over at least every instruction in the basic blocks that contain users we want to evaluate for lowering. For a large nested JSON literal, thousands of objects may be in the same basic block, so iterating over this huge basic block for each object allocation quickly becomes expensive. However, it is not necessary to do a full pass for every object allocation. Instead, we can construct an ordered list of the stores to a given allocation in each basic block with a single pass over the function. Then, for each `AllocObject`, we can traverse just its stores. Reviewed By: tmikov Differential Revision: D30626992 fbshipit-source-id: 4c68ec8eb9cec40a29bc2c46662c688b3860faaa
- Loading branch information
1 parent
0bd09e3
commit 3213794
Showing
2 changed files
with
46 additions
and
37 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