diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-09-23 17:30:05 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-01 09:04:46 -0400 |
commit | 9600a5fbd79c8434cf68aad078f26577da0530ad (patch) | |
tree | ab5c065c3ed811ed1d07db7c506e738a1ea73472 /.gitlab | |
parent | 9606774db875841916a7fef9fc169f39565d9f25 (diff) | |
download | haskell-9600a5fbd79c8434cf68aad078f26577da0530ad.tar.gz |
code gen: Improve efficiency of findPrefRealReg
Old strategy: For each variable linearly scan through all the blocks and
check to see if the variable is any of the block register mappings. This
is very slow when you have a lot of blocks.
New strategy: Maintain a map from virtual registers to the first real
register the virtual register was assigned to. Consult this map in
findPrefRealReg.
The map is updated when the register mapping is updated and is hidden
behind the BlockAssigment abstraction.
On the mmark package this reduces compilation time from about 44s to
32s.
Ticket: #19471
Diffstat (limited to '.gitlab')
0 files changed, 0 insertions, 0 deletions