From 26673217ad3805d5aca555e0351ff40eaaf9be87 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 10 Dec 2004 17:58:07 +0000 Subject: [PATCH] tree-ssa-dom.c (thread_across_edge): Speed up by avoiding a call to is_gimple_min_invariant if we know the result. * tree-ssa-dom.c (thread_across_edge): Speed up by avoiding a call to is_gimple_min_invariant if we know the result. From-SVN: r92003 --- gcc/ChangeLog | 3 +++ gcc/tree-ssa-dom.c | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ca006e189e..fad1ef66a9e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 * tree-ssa-alias.c (setup_pointers_and_addressables): Remove diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index cce041296a7..39ac925fb32 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -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