Add a coalescing pass to the register allocator.

Coalescing means creating virtual registers and transforming the code
into conventional SSA form. This means that every value used as a branch
argument will belong to the same virtual register as the corresponding
EBB argument value.

Conventional SSA form makes it easy to avoid memory-memory copies when
spilling values, and the virtual registers can be used as hints when
picking registers too. This reduces the number of register moves needed
for EBB arguments.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-21 09:24:12 -07:00
parent d5055275c4
commit 85b624d13b
5 changed files with 661 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ pub mod live_value_tracker;
pub mod coloring;
mod affinity;
mod coalescing;
mod context;
mod diversion;
mod pressure;