
176 Energy-Aware Memory Management for EMSs
Algorithm 5.3 Color coalescing of all iteration domains till register allocation
can be done
Require: Initial Colored list of OAT Domains
Ensure: Colored list of OAT Domains that are register allocatable and call
the register allocator
{Phase 3: Color Coalescing}
Call Algorithm 5.4
1: for all D
OAT
A
in reverse order of priorities do
2: for all D
OAT
B
in order of number of usages with D
OAT
A
in the same iteration
domains D
iter
i
do
3: if Array A and B used together later in same D
iter
i
and Not in same
statement and Same access pattern (for e.g. D
oper
ijA
= D
oper
ijB
) then
Merge Colors of D
OAT
A
and D
OAT
B
Call Algorithm 5.4
4: