From c35c7e526f1da3895f6a1eb33b8c68585fd6c27c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 30 Jan 2003 10:09:15 -0800 Subject: [PATCH] * tree-inline.c (walk_tree): Streamline duplicate hash table lookup. From-SVN: r62151 --- gcc/ChangeLog | 4 ++++ gcc/tree-inline.c | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5f5bb8b229..6de454ae910 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-01-30 Richard Henderson + + * tree-inline.c (walk_tree): Streamline duplicate hash table lookup. + 2003-01-30 Richard Earnshaw * arm.c (arm_compute_initial_elimination_offset): If optimizing for diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index d2f1a0e6eff..e4bdf12e52f 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -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; } -- 2.30.2