Skip to content

Register allocation: try aggressive coalescing first - #594

Open
xavierleroy wants to merge 1 commit into
masterfrom
coalescing
Open

Register allocation: try aggressive coalescing first#594
xavierleroy wants to merge 1 commit into
masterfrom
coalescing

Conversation

@xavierleroy

Copy link
Copy Markdown
Contributor

The IRC graph coloring algorithm is often too prudent with the coalescing of moves, leaving moves unchanged by fear that coalescing them could cause more spilling.

As an experiment, this PR runs a first round of coloring with aggressive coalescing of moves. If this causes spilling, it retries coloring with iterated coalescing, like before.

This should result in fewer moves for functions that can run entirely in registers. For other functions, there should be no difference with the current coloring strategy. The only possible downside is increased compilation time because of the extra round of coloring.

I haven't tried to evaluate the impact on code size and execution times yet.

Run a first round of coloring with aggressive coalescing of moves.
If this causes spilling, retry with iterated coalescing, like before.
This should result in fewer moves for functions that can run entirely
in registers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant