diff options
author | Björn Gustavsson <[email protected]> | 2018-11-15 03:22:53 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-11-15 14:07:50 +0100 |
commit | 64a15f2979c4644298cdad1319919fe84103484e (patch) | |
tree | fc8e55da51797f5b8f386b5742c6ebf00df5ea53 /otp_versions.table | |
parent | 693cda7f01137eda93362a74abd6028c41d2f5c6 (diff) | |
download | otp-64a15f2979c4644298cdad1319919fe84103484e.tar.gz otp-64a15f2979c4644298cdad1319919fe84103484e.tar.bz2 otp-64a15f2979c4644298cdad1319919fe84103484e.zip |
beam_ssa_pre_codegen: Eliminate a bottleneck in linear scan
The linear scan algorithm keeps unhandled intervals in two separate
lists: one for intervals with reserved registers and one for intervals
without reserved registers. When collecting the available free registers
all unhandled intervals with reserved registers must be checked for
overlap.
Unhandled intervals that had a preferred register were put into the
list of intervals with reserved registers, leading to a lot of
unecessary overlap checking if there were many intervals with
preferred registers. Changing the partition code to put intervals with
preferred registers into the general list of unhandled intervals will
reduce the compilation time if there are many preferred registers.
On my computer, this change reduced the time of the linear scan pass
from about 20 seconds down to about 0.5 seconds for this module:
https://github.com/aggelgian/cuter/blob/master/src/cuter_binlib.erl
Noticed-by: Kostis Sagonas
Diffstat (limited to 'otp_versions.table')
0 files changed, 0 insertions, 0 deletions