]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
var-tracking.c (dataflow_set_equiv_regs): Shortcut the loop if ...
authorJakub Jelinek <jakub@gcc.gnu.org>
Thu, 3 Jun 2010 11:27:49 +0000 (13:27 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 3 Jun 2010 11:27:49 +0000 (13:27 +0200)
* var-tracking.c (dataflow_set_equiv_regs): Shortcut the loop if
set->regs[i] is NULL or has just one entry.

From-SVN: r160216

gcc/ChangeLog
gcc/var-tracking.c

index c397c2562d6c614104ad1289758b14e87daa9ed2..8e4aed8a338da09f4e1331f351f27f532ac43944 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-03  Jan Hubicka  <jh@suse.cz>
+           Jakub Jelinek  <jakub@redhat.com>
+
+       * var-tracking.c (dataflow_set_equiv_regs): Shortcut the loop if                                                                        
+       set->regs[i] is NULL or has just one entry.
+
 2010-06-03  Jan Hubicka  <jh@suse.cz>
 
        * lto-cgraph.c (lto_varpool_encoder_size): Remove.
        * tree-inline.c (estimate_num_insns): For stdarg functions look
        into call statement to count cost of argument passing.
 
-2010-06-01  Kai Tietz
+2010-06-01  Kai Tietz  <kai.tietz@onevision.com>
 
         * config/i386.c (ix86_output_addr_vec_elt): Make LPREFIX
         argument for fprintf.
index 967661274cec8d05185161394fbe972417170a48..76cd7f85b1949669e968d5a35cbbee68e40c3407 100644 (file)
@@ -3694,6 +3694,11 @@ dataflow_set_equiv_regs (dataflow_set *set)
     {
       rtx canon[NUM_MACHINE_MODES];
 
+      /* If the list is empty or one entry, no need to canonicalize
+        anything.  */
+      if (set->regs[i] == NULL || set->regs[i]->next == NULL)
+       continue;
+
       memset (canon, 0, sizeof (canon));
 
       for (list = set->regs[i]; list; list = list->next)