OSDN Git Service

* tree-ssa-dom.c (thread_across_edge): Speed up by avoiding a
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Dec 2004 17:58:07 +0000 (17:58 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Dec 2004 17:58:07 +0000 (17:58 +0000)
call to is_gimple_min_invariant if we know the result.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92003 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-dom.c

index 8ca006e..fad1ef6 100644 (file)
@@ -3,6 +3,9 @@
        * tree-data-ref.c (free_data_refs): Free each data_reference
        object.
 
+       * tree-ssa-dom.c (thread_across_edge): Speed up by avoiding a
+       call to is_gimple_min_invariant if we know the result.
+
 2004-12-10  Jeff Law  <law@redhat.com>
 
        * tree-ssa-alias.c (setup_pointers_and_addressables): Remove
index cce0412..39ac925 100644 (file)
@@ -745,12 +745,12 @@ thread_across_edge (struct dom_walk_data *walk_data, edge e)
             otherwise look it up in the hash tables.  */
          cached_lhs = local_fold (COND_EXPR_COND (dummy_cond));
          if (! is_gimple_min_invariant (cached_lhs))
-           cached_lhs = lookup_avail_expr (dummy_cond, false);
-         if (!cached_lhs || ! is_gimple_min_invariant (cached_lhs))
            {
-             cached_lhs = simplify_cond_and_lookup_avail_expr (dummy_cond,
-                                                               NULL,
-                                                               false);
+             cached_lhs = lookup_avail_expr (dummy_cond, false);
+             if (!cached_lhs || ! is_gimple_min_invariant (cached_lhs))
+               cached_lhs = simplify_cond_and_lookup_avail_expr (dummy_cond,
+                                                                 NULL,
+                                                                 false);
            }
        }
       /* We can have conditionals which just test the state of a