ira.c: Add comment about threads at the top of file.
authorVladimir Makarov <vmakarov@redhat.com>
Thu, 14 Nov 2013 01:51:07 +0000 (01:51 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Thu, 14 Nov 2013 01:51:07 +0000 (01:51 +0000)
2013-11-13  Vladimir Makarov  <vmakarov@redhat.com>

* ira.c: Add comment about threads at the top of file.

From-SVN: r204772

gcc/ChangeLog
gcc/ira.c

index 3345867..91c22d3 100644 (file)
@@ -1,5 +1,9 @@
 2013-11-13  Vladimir Makarov  <vmakarov@redhat.com>
 
+       * ira.c: Add comment about threads at the top of file.
+
+2013-11-13  Vladimir Makarov  <vmakarov@redhat.com>
+
        * ira-color.c (coalesce_allocnos): Don't allocate and free
        sorted_copies.
 
index 2ef69cb..dbc5a0a 100644 (file)
--- 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