* tree-inline.c (walk_tree): Streamline duplicate hash table lookup.
authorRichard Henderson <rth@redhat.com>
Thu, 30 Jan 2003 18:09:15 +0000 (10:09 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 30 Jan 2003 18:09:15 +0000 (10:09 -0800)
From-SVN: r62151

gcc/ChangeLog
gcc/tree-inline.c

index b5f5bb8b2290221b2cc53d5d5453f37e5b7b39ad..6de454ae910f96753b74bedfb67d88c3ec72b40f 100644 (file)
@@ -1,3 +1,7 @@
+2003-01-30  Richard Henderson  <rth@redhat.com>
+
+       * tree-inline.c (walk_tree): Streamline duplicate hash table lookup.
+
 2003-01-30  Richard Earnshaw  <rearnsha@arm.com>
 
        * arm.c (arm_compute_initial_elimination_offset): If optimizing for
index d2f1a0e6eff9ee1a27bd428530c03ba8d1f3bd37..e4bdf12e52f5a1d56b659a62ede233aed35b9679 100644 (file)
@@ -1530,10 +1530,9 @@ walk_tree (tp, func, data, htab_)
 
       /* Don't walk the same tree twice, if the user has requested
          that we avoid doing so.  */
-      if (htab_find (htab, *tp))
-       return NULL_TREE;
-      /* If we haven't already seen this node, add it to the table.  */
       slot = htab_find_slot (htab, *tp, INSERT);
+      if (*slot)
+       return NULL_TREE;
       *slot = *tp;
     }