aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2010-06-03 13:27:49 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2010-06-03 13:27:49 +0200
commit193d4c0f78db7d9e50dff16339647bafb76f92a4 (patch)
treec8d4ba17142cc1576c46eab39a7f84c284d79dff
parent703e95cf1554ad654c4dda356b666bd13048a0d6 (diff)
downloadgcc-193d4c0f78db7d9e50dff16339647bafb76f92a4.zip
gcc-193d4c0f78db7d9e50dff16339647bafb76f92a4.tar.gz
gcc-193d4c0f78db7d9e50dff16339647bafb76f92a4.tar.bz2
var-tracking.c (dataflow_set_equiv_regs): Shortcut the loop if ...
* var-tracking.c (dataflow_set_equiv_regs): Shortcut the loop if set->regs[i] is NULL or has just one entry. From-SVN: r160216
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/var-tracking.c5
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c397c25..8e4aed8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,10 @@
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.
* lto-streamer.h (lto_varpool_encoder_size): New inline function.
@@ -546,7 +552,7 @@
* 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.
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 9676612..76cd7f8 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -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)