diff options
author | Tobias Dammers <tdammers@gmail.com> | 2017-10-25 15:50:32 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-10-25 15:50:54 -0400 |
commit | df636682f3b8299268d189bfaf6de1d672c19a73 (patch) | |
tree | 2e62f1bda4e546af1148707637b3a229a615e517 /docs/users_guide/flags.py | |
parent | 1c15d8ed112bccf2635d571767733b2a26d8fb21 (diff) | |
download | haskell-df636682f3b8299268d189bfaf6de1d672c19a73.tar.gz |
Performance improvements linear regAlloc (#7258)
When allocating and potentially spilling registers, we need to check
the desired allocations against current allocations to decide where we
can spill to, cq. which allocations we can toss and if so, how.
Previously, this was done by walking the Cartesian product of the
current allocations (`assig`) and the allocations to keep (`keep`),
which has quadratic complexity. This patch introduces two improvements:
1. pre-filter the `assig` list, because we are only interested in two
types of allocations (in register, and in register+memory), which will
only make up a small and constant portion of the list; and
2. use set / map operations instead of lists, which reduces algorithmic
complexity.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4109
Diffstat (limited to 'docs/users_guide/flags.py')
0 files changed, 0 insertions, 0 deletions