Repository navigation
Commit c44d528
authored
[StackColoring] Declare BitVector outside the loop (#95688)
The StackColoring pass creates two instances of BitVector per basic
block until the fixed point is reached. Each instance may involve a
heap allocation depending on its size.
This patch declares them outside the loop, saving 1.40% of heap
allocations during the compilation of CGBuiltin.cpp.ii, a preprocessed
version of CGBuiltin.cpp.1 parent a74a86c commit c44d528
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
773 | 773 | | |
774 | 774 | | |
775 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
776 | 780 | | |
777 | 781 | | |
778 | 782 | | |
| |||
784 | 788 | | |
785 | 789 | | |
786 | 790 | | |
787 | | - | |
| 791 | + | |
788 | 792 | | |
789 | 793 | | |
790 | 794 | | |
| |||
801 | 805 | | |
802 | 806 | | |
803 | 807 | | |
804 | | - | |
| 808 | + | |
805 | 809 | | |
806 | 810 | | |
807 | 811 | | |
| |||
0 commit comments