-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler: Prune dead variables during alias analysis
Variables which die in a basic block cannot influence the alias status of variables in successor blocks. By pruning dead variables, which are not part of a parent-child derivation relationship of live variables, the size of the active sharing state is reduced. The reduction in size speeds up subsequent `aa_merge_ss/3` operations. Combined with improved kill-set calculation (8545471) and an improved data structure for describing the alias status of variables (c389665), this patch provides a substantial reduction of the time required for alias analysis. For the set of modules compiled by `scripts/diffable` the time spent in alias analysis is reduced by approximately 55%. For the example in Issue #7432 [1], provided by José Valim, which has a large number of variables, the reduction is even more dramatic. The time spent in the alias analysis pass is reduced by 97%. [1] #7432 Closes: #7432
- Loading branch information
Showing
1 changed file
with
83 additions
and
27 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