From patchwork Tue Aug 16 07:39:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 73952 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1851804qga; Tue, 16 Aug 2016 00:40:06 -0700 (PDT) X-Received: by 10.98.70.199 with SMTP id o68mr2618137pfi.17.1471333206519; Tue, 16 Aug 2016 00:40:06 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id b64si30910426pfa.51.2016.08.16.00.40.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 00:40:06 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-434029-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-434029-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-434029-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=mqgZ5Y144yqkagOCF xAe9GS0Xoqyex3/agC88XRC9SkFJdB42OHXtzI3vT7LVAtwbbOnvqz0GduFteIsx FFE+1I36MGzMybx6MUaTKSvuEKdBQ+qo8UBKlOGYTGEnokUDr6dOhQAv3vlfZ1Oz gUbUTboD7untUO/qcabLVPm2y0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=EvmPKsbCX1AZa/lYiUkA6Zy XWZY=; b=Je07KosUOcXbh5RKAQIIpbvq29cWoQGCpwRzauTfeyvw6lJNLWGYNWG ijxD7zBNAYlvH2kabqZ1msDxfrQ6mEOKZi0yL/PfhTZGdWbjO/BnlmN7kp7zWR+F RZmRq36xAzhN6ZeIXGCh9xp/jBkBGODI9H+auUR1yjb+H99Dpzm8= Received: (qmail 4343 invoked by alias); 16 Aug 2016 07:39:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 4324 invoked by uid 89); 16 Aug 2016 07:39:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=searches, Searches, GIMPLE_COND, UD:max X-HELO: mail-pf0-f182.google.com Received: from mail-pf0-f182.google.com (HELO mail-pf0-f182.google.com) (209.85.192.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Aug 2016 07:39:37 +0000 Received: by mail-pf0-f182.google.com with SMTP id y134so25051827pfg.0 for ; Tue, 16 Aug 2016 00:39:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=m916X78Tr1V3pOVueNw2y96KWnch5ZsS36dfPp+meeQ=; b=QtlpHjP37NiT37vzMNxfiTS9pAc8BIboF7jCCaBWHY3y9AVEmF2lblynuDgj2kpv91 Hz3bRvUbFYBvXZekl+ima6jQVwhSTI/O6/nkJ7dfOFO0V7mxemA8sIWKs6zbVb384vg/ sFuvYHeHKKIDe/AxHT3udhaC2k+caQK4urmq9bzyfbF7JA2sNew1muxEwS37itFG2GHI 32FOilTMVN9Fql5IgA7JPyTxCmmYzv/bhUAQo0+3zvyuaFOX4SedjyCYcRSqFq718V+Y XZ0CpK6Lw+PuKj4W+Nj/rFQToLYVxKUjN2xH4WFnHSPHM6d7VbTRsU4/a7SWt+Sl6mId rDYw== X-Gm-Message-State: AEkoouv+4c+VuZUKBjFLMlb3F7DwRraZajdcunNu5C8msAPtBfgXE0pBTpKTZ/vObBnwrlbO X-Received: by 10.98.196.77 with SMTP id y74mr61450145pff.97.1471333176040; Tue, 16 Aug 2016 00:39:36 -0700 (PDT) Received: from [10.1.1.3] (58-6-183-210.dyn.iinet.net.au. [58.6.183.210]) by smtp.gmail.com with ESMTPSA id e68sm36587701pfk.1.2016.08.16.00.39.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 00:39:33 -0700 (PDT) Subject: [RFC][IPA-VRP] splits out the update_value_range calls from vrp_visit_stmt To: Richard Biener References: <57886949.8010300@linaro.org> <57886A71.6030103@linaro.org> <57888BD6.6070200@linaro.org> <578891C8.7090609@linaro.org> <19ff8188-aed7-0f9e-cc0b-0603698787ff@linaro.org> <48e42d0c-057c-312a-4e41-cd78c8b38b5e@linaro.org> Cc: Andrew Pinski , "gcc-patches@gcc.gnu.org" , Jan Hubicka , Martin Jambor From: kugan Message-ID: <3a581e5d-921a-18ef-5c3d-e1d1158ec40c@linaro.org> Date: Tue, 16 Aug 2016 17:39:27 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: X-IsSubscribed: yes Hi, > as said the refactoring that would be appreciated is to split out the > update_value_range calls > from the worker functions so you can call the respective functions > from the DOM implementations. > That they are globbed in vrp_visit_stmt currently is due to the API of > the SSA propagator. Here is a patch that just splits out the update_value_range calls visit_stmts. Bootstrapped and regression tested on x86_64-linux with no new regressions. I also verified few random fdump-tree-vrp1-details from stage2 to make sure they are same. Is this OK for trunk? Thanks, Kugan gcc/ChangeLog: 2016-08-16 Kugan Vivekanandarajah * tree-vrp.c (vrp_visit_assignment_or_call): Changed to Return VR. (vrp_visit_cond_stmt): Just sets TAKEN_EDGE_P. (vrp_visit_switch_stmt): Likewise. (vrp_visit_stmt_worker): Factored out from vrp_visit_stmt. (vrp_visit_phi_node_worker): Factored out from vrp_visit_phi_stmt. (vrp_visit_stmt): Use vrp_visit_stmt_worker. (vrp_visit_phi_node): Use vrp_visit_phi_node_worker. >From 0355d191c1141847a59589f9df267d0ee9d9ddb2 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Tue, 16 Aug 2016 13:48:21 +1000 Subject: [PATCH 2/5] Refactor vrp_visit_stmt --- gcc/tree-vrp.c | 222 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 130 insertions(+), 92 deletions(-) diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index cf04bec..5a37579 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -7030,16 +7030,18 @@ vrp_valueize_1 (tree name) return name; } -/* Visit assignment STMT. If it produces an interesting range, record - the SSA name in *OUTPUT_P. */ +/* Visit assignment STMt. If it produces an interesting range, record + the range in VR and return true. If the immediate uses might be interesting + set SSA name in *OUTPUT_P. */ -static enum ssa_prop_result -vrp_visit_assignment_or_call (gimple *stmt, tree *output_p) +static bool +vrp_visit_assignment_or_call (gimple *stmt, tree *output_p, value_range *vr) { tree def, lhs; ssa_op_iter iter; enum gimple_code code = gimple_code (stmt); lhs = gimple_get_lhs (stmt); + *output_p = NULL_TREE; /* We only keep track of ranges in integral and pointer types. */ if (TREE_CODE (lhs) == SSA_NAME @@ -7050,39 +7052,17 @@ vrp_visit_assignment_or_call (gimple *stmt, tree *output_p) && TYPE_MAX_VALUE (TREE_TYPE (lhs))) || POINTER_TYPE_P (TREE_TYPE (lhs)))) { - value_range new_vr = VR_INITIALIZER; - /* Try folding the statement to a constant first. */ tree tem = gimple_fold_stmt_to_constant_1 (stmt, vrp_valueize, vrp_valueize_1); if (tem && is_gimple_min_invariant (tem)) - set_value_range_to_value (&new_vr, tem, NULL); + set_value_range_to_value (vr, tem, NULL); /* Then dispatch to value-range extracting functions. */ else if (code == GIMPLE_CALL) - extract_range_basic (&new_vr, stmt); + extract_range_basic (vr, stmt); else - extract_range_from_assignment (&new_vr, as_a (stmt)); - - if (update_value_range (lhs, &new_vr)) - { - *output_p = lhs; - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Found new range for "); - print_generic_expr (dump_file, lhs, 0); - fprintf (dump_file, ": "); - dump_value_range (dump_file, &new_vr); - fprintf (dump_file, "\n"); - } - - if (new_vr.type == VR_VARYING) - return SSA_PROP_VARYING; - - return SSA_PROP_INTERESTING; - } - - return SSA_PROP_NOT_INTERESTING; + extract_range_from_assignment (vr, as_a (stmt)); + return true; } else if (is_gimple_call (stmt) && gimple_call_internal_p (stmt)) switch (gimple_call_internal_fn (stmt)) @@ -7097,7 +7077,7 @@ vrp_visit_assignment_or_call (gimple *stmt, tree *output_p) { imm_use_iterator iter; use_operand_p use_p; - enum ssa_prop_result res = SSA_PROP_VARYING; + bool changed = false; set_value_range_to_varying (get_value_range (lhs)); @@ -7135,18 +7115,18 @@ vrp_visit_assignment_or_call (gimple *stmt, tree *output_p) || !vrp_operand_equal_p (old_vr->min, new_vr.min) || !vrp_operand_equal_p (old_vr->max, new_vr.max) || !vrp_bitmap_equal_p (old_vr->equiv, new_vr.equiv)) - res = SSA_PROP_INTERESTING; + changed = true; else - res = SSA_PROP_NOT_INTERESTING; + changed = false; BITMAP_FREE (new_vr.equiv); - if (res == SSA_PROP_INTERESTING) + if (changed) { *output_p = lhs; - return res; + return false; } } - return res; + return false; } break; default: @@ -7157,7 +7137,7 @@ vrp_visit_assignment_or_call (gimple *stmt, tree *output_p) FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_DEF) set_value_range_to_varying (get_value_range (def)); - return SSA_PROP_VARYING; + return false; } /* Helper that gets the value range of the SSA_NAME with version I @@ -7529,10 +7509,9 @@ vrp_evaluate_conditional (tree_code code, tree op0, tree op1, gimple *stmt) /* Visit conditional statement STMT. If we can determine which edge will be taken out of STMT's basic block, record it in - *TAKEN_EDGE_P and return SSA_PROP_INTERESTING. Otherwise, return - SSA_PROP_VARYING. */ + *TAKEN_EDGE_P. Otherwise, set *TAKEN_EDGE_P to NULL. */ -static enum ssa_prop_result +static void vrp_visit_cond_stmt (gcond *stmt, edge *taken_edge_p) { tree val; @@ -7630,8 +7609,6 @@ vrp_visit_cond_stmt (gcond *stmt, edge *taken_edge_p) else print_generic_stmt (dump_file, val, 0); } - - return (*taken_edge_p) ? SSA_PROP_INTERESTING : SSA_PROP_VARYING; } /* Searches the case label vector VEC for the index *IDX of the CASE_LABEL @@ -7828,10 +7805,9 @@ find_case_label_ranges (gswitch *stmt, value_range *vr, size_t *min_idx1, /* Visit switch statement STMT. If we can determine which edge will be taken out of STMT's basic block, record it in - *TAKEN_EDGE_P and return SSA_PROP_INTERESTING. Otherwise, return - SSA_PROP_VARYING. */ + *TAKEN_EDGE_P. Otherwise, *TAKEN_EDGE_P set to NULL. */ -static enum ssa_prop_result +static void vrp_visit_switch_stmt (gswitch *stmt, edge *taken_edge_p) { tree op, val; @@ -7842,7 +7818,7 @@ vrp_visit_switch_stmt (gswitch *stmt, edge *taken_edge_p) *taken_edge_p = NULL; op = gimple_switch_index (stmt); if (TREE_CODE (op) != SSA_NAME) - return SSA_PROP_VARYING; + return; vr = get_value_range (op); if (dump_file && (dump_flags & TDF_DETAILS)) @@ -7857,7 +7833,7 @@ vrp_visit_switch_stmt (gswitch *stmt, edge *taken_edge_p) if ((vr->type != VR_RANGE && vr->type != VR_ANTI_RANGE) || symbolic_range_p (vr)) - return SSA_PROP_VARYING; + return; /* Find the single edge that is taken from the switch expression. */ take_default = !find_case_label_ranges (stmt, vr, &i, &j, &k, &l); @@ -7882,7 +7858,7 @@ vrp_visit_switch_stmt (gswitch *stmt, edge *taken_edge_p) if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " not a single destination for this " "range\n"); - return SSA_PROP_VARYING; + return; } for (++i; i <= j; ++i) { @@ -7891,7 +7867,7 @@ vrp_visit_switch_stmt (gswitch *stmt, edge *taken_edge_p) if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " not a single destination for this " "range\n"); - return SSA_PROP_VARYING; + return; } } for (; k <= l; ++k) @@ -7901,7 +7877,7 @@ vrp_visit_switch_stmt (gswitch *stmt, edge *taken_edge_p) if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " not a single destination for this " "range\n"); - return SSA_PROP_VARYING; + return; } } } @@ -7914,22 +7890,21 @@ vrp_visit_switch_stmt (gswitch *stmt, edge *taken_edge_p) fprintf (dump_file, " will take edge to "); print_generic_stmt (dump_file, CASE_LABEL (val), 0); } - - return SSA_PROP_INTERESTING; } /* Evaluate statement STMT. If the statement produces a useful range, - return SSA_PROP_INTERESTING and record the SSA name with the - interesting range into *OUTPUT_P. + return true. - If STMT is a conditional branch and we can determine its truth - value, the taken edge is recorded in *TAKEN_EDGE_P. + If the immediate uses might be interesting + set SSA name in *OUTPUT_P. - If STMT produces a varying value, return SSA_PROP_VARYING. */ + If STMT is a conditional branch and we can determine its truth + value, the taken edge is recorded in *TAKEN_EDGE_P. */ -static enum ssa_prop_result -vrp_visit_stmt (gimple *stmt, edge *taken_edge_p, tree *output_p) +static bool +vrp_visit_stmt_worker (gimple *stmt, edge *taken_edge_p, + tree *output_p, value_range *vr) { tree def; ssa_op_iter iter; @@ -7943,18 +7918,69 @@ vrp_visit_stmt (gimple *stmt, edge *taken_edge_p, tree *output_p) if (!stmt_interesting_for_vrp (stmt)) gcc_assert (stmt_ends_bb_p (stmt)); else if (is_gimple_assign (stmt) || is_gimple_call (stmt)) - return vrp_visit_assignment_or_call (stmt, output_p); + return vrp_visit_assignment_or_call (stmt, output_p, vr); else if (gimple_code (stmt) == GIMPLE_COND) - return vrp_visit_cond_stmt (as_a (stmt), taken_edge_p); + { + vrp_visit_cond_stmt (as_a (stmt), taken_edge_p); + return false; + } else if (gimple_code (stmt) == GIMPLE_SWITCH) - return vrp_visit_switch_stmt (as_a (stmt), taken_edge_p); - + { + vrp_visit_switch_stmt (as_a (stmt), taken_edge_p); + return false; + } /* All other statements produce nothing of interest for VRP, so mark their outputs varying and prevent further simulation. */ FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_DEF) set_value_range_to_varying (get_value_range (def)); + return false; +} + +/* Evaluate statement STMT. If the statement produces a useful range, + return SSA_PROP_INTERESTING and record the SSA name with the + interesting range into *OUTPUT_P. + + If STMT is a conditional branch and we can determine its truth + value, the taken edge is recorded in *TAKEN_EDGE_P. + + If STMT produces a varying value, return SSA_PROP_VARYING. */ + +static enum ssa_prop_result +vrp_visit_stmt (gimple *stmt, edge *taken_edge_p, tree *output_p) +{ + value_range vr = VR_INITIALIZER; + tree lhs = gimple_get_lhs (stmt); + bool vr_found = vrp_visit_stmt_worker (stmt, taken_edge_p, + output_p, &vr); + + if (lhs) + { + if (vr_found + && update_value_range (lhs, &vr)) + { + *output_p = lhs; + if (dump_file && (dump_flags & TDF_DETAILS)) + { + fprintf (dump_file, "Found new range for "); + print_generic_expr (dump_file, lhs, 0); + fprintf (dump_file, ": "); + dump_value_range (dump_file, &vr); + fprintf (dump_file, "\n"); + } + + if (vr.type == VR_VARYING) + return SSA_PROP_VARYING; + + return SSA_PROP_INTERESTING; + } - return SSA_PROP_VARYING; + if (*output_p) + return SSA_PROP_INTERESTING; + + return SSA_PROP_NOT_INTERESTING; + } + + return (*taken_edge_p) ? SSA_PROP_INTERESTING : SSA_PROP_VARYING; } /* Union the two value-ranges { *VR0TYPE, *VR0MIN, *VR0MAX } and @@ -8679,15 +8705,14 @@ vrp_meet (value_range *vr0, const value_range *vr1) /* Visit all arguments for PHI node PHI that flow through executable edges. If a valid value range can be derived from all the incoming - value ranges, set a new range for the LHS of PHI. */ + value ranges, set a new range in VR_RESULT. */ -static enum ssa_prop_result -vrp_visit_phi_node (gphi *phi) +static void +vrp_visit_phi_node_worker (gphi *phi, value_range *vr_result) { size_t i; tree lhs = PHI_RESULT (phi); value_range *lhs_vr = get_value_range (lhs); - value_range vr_result = VR_INITIALIZER; bool first = true; int edges, old_edges; struct loop *l; @@ -8779,19 +8804,19 @@ vrp_visit_phi_node (gphi *phi) } if (first) - copy_value_range (&vr_result, &vr_arg); + copy_value_range (vr_result, &vr_arg); else - vrp_meet (&vr_result, &vr_arg); + vrp_meet (vr_result, &vr_arg); first = false; - if (vr_result.type == VR_VARYING) + if (vr_result->type == VR_VARYING) break; } } - if (vr_result.type == VR_VARYING) + if (vr_result->type == VR_VARYING) goto varying; - else if (vr_result.type == VR_UNDEFINED) + else if (vr_result->type == VR_UNDEFINED) goto update_range; old_edges = vr_phi_edge_counts[SSA_NAME_VERSION (lhs)]; @@ -8813,16 +8838,16 @@ vrp_visit_phi_node (gphi *phi) { /* Compare old and new ranges, fall back to varying if the values are not comparable. */ - int cmp_min = compare_values (lhs_vr->min, vr_result.min); + int cmp_min = compare_values (lhs_vr->min, vr_result->min); if (cmp_min == -2) goto varying; - int cmp_max = compare_values (lhs_vr->max, vr_result.max); + int cmp_max = compare_values (lhs_vr->max, vr_result->max); if (cmp_max == -2) goto varying; /* For non VR_RANGE or for pointers fall back to varying if the range changed. */ - if ((lhs_vr->type != VR_RANGE || vr_result.type != VR_RANGE + if ((lhs_vr->type != VR_RANGE || vr_result->type != VR_RANGE || POINTER_TYPE_P (TREE_TYPE (lhs))) && (cmp_min != 0 || cmp_max != 0)) goto varying; @@ -8836,23 +8861,23 @@ vrp_visit_phi_node (gphi *phi) iteration compute whether there will be any overflow, at the expense of one additional iteration. */ if (cmp_min < 0) - vr_result.min = lhs_vr->min; + vr_result->min = lhs_vr->min; else if (cmp_min > 0 - && !vrp_val_is_min (vr_result.min)) - vr_result.min + && !vrp_val_is_min (vr_result->min)) + vr_result->min = int_const_binop (PLUS_EXPR, - vrp_val_min (TREE_TYPE (vr_result.min)), - build_int_cst (TREE_TYPE (vr_result.min), 1)); + vrp_val_min (TREE_TYPE (vr_result->min)), + build_int_cst (TREE_TYPE (vr_result->min), 1)); /* Similarly for the maximum value. */ if (cmp_max > 0) - vr_result.max = lhs_vr->max; + vr_result->max = lhs_vr->max; else if (cmp_max < 0 - && !vrp_val_is_max (vr_result.max)) - vr_result.max + && !vrp_val_is_max (vr_result->max)) + vr_result->max = int_const_binop (MINUS_EXPR, - vrp_val_max (TREE_TYPE (vr_result.min)), - build_int_cst (TREE_TYPE (vr_result.min), 1)); + vrp_val_max (TREE_TYPE (vr_result->min)), + build_int_cst (TREE_TYPE (vr_result->min), 1)); /* If we dropped either bound to +-INF then if this is a loop PHI node SCEV may known more about its value-range. */ @@ -8866,7 +8891,7 @@ vrp_visit_phi_node (gphi *phi) goto update_range; varying: - set_value_range_to_varying (&vr_result); + set_value_range_to_varying (vr_result); scev_check: /* If this is a loop PHI node SCEV may known more about its value-range. @@ -8875,22 +8900,35 @@ scev_check: avoid infinite simulation. */ if ((l = loop_containing_stmt (phi)) && l->header == gimple_bb (phi)) - adjust_range_with_scev (&vr_result, l, phi, lhs); + adjust_range_with_scev (vr_result, l, phi, lhs); infinite_check: /* If we will end up with a (-INF, +INF) range, set it to VARYING. Same if the previous max value was invalid for the type and we end up with vr_result.min > vr_result.max. */ - if ((vr_result.type == VR_RANGE || vr_result.type == VR_ANTI_RANGE) - && !((vrp_val_is_max (vr_result.max) && vrp_val_is_min (vr_result.min)) - || compare_values (vr_result.min, vr_result.max) > 0)) + if ((vr_result->type == VR_RANGE || vr_result->type == VR_ANTI_RANGE) + && !((vrp_val_is_max (vr_result->max) && vrp_val_is_min (vr_result->min)) + || compare_values (vr_result->min, vr_result->max) > 0)) ; else - set_value_range_to_varying (&vr_result); + set_value_range_to_varying (vr_result); /* If the new range is different than the previous value, keep iterating. */ update_range: + return; +} + +/* Visit all arguments for PHI node PHI that flow through executable + edges. If a valid value range can be derived from all the incoming + value ranges, set a new range for the LHS of PHI. */ + +static enum ssa_prop_result +vrp_visit_phi_node (gphi *phi) +{ + tree lhs = PHI_RESULT (phi); + value_range vr_result = VR_INITIALIZER; + vrp_visit_phi_node_worker (phi, &vr_result); if (update_value_range (lhs, &vr_result)) { if (dump_file && (dump_flags & TDF_DETAILS)) -- 2.7.4