diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3345867289f..91c22d3ed09 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2013-11-13 Vladimir Makarov + + * ira.c: Add comment about threads at the top of file. + 2013-11-13 Vladimir Makarov * ira-color.c (coalesce_allocnos): Don't allocate and free diff --git a/gcc/ira.c b/gcc/ira.c index 2ef69cb5e6d..dbc5a0ad997 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -192,7 +192,14 @@ along with GCC; see the file COPYING3. If not see this point. There is some freedom in the order of putting allocnos on the stack which can affect the final result of the allocation. IRA uses some heuristics to improve the - order. + order. The major one is to form *threads* from colorable + allocnos and push them on the stack by threads. Thread is a + set of non-conflicting colorable allocnos connected by + copies. The thread contains allocnos from the colorable + bucket or colorable allocnos already pushed onto the coloring + stack. Pushing thread allocnos one after another onto the + stack increases chances of removing copies when the allocnos + get the same hard reg. We also use a modification of Chaitin-Briggs algorithm which works for intersected register classes of allocnos. To