X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftree-ssa-phiopt.c;h=2f8594866915675a6ee81805e36984ca76aca4a6;hb=6bcaed8684cf4629e589418bbc9d54fc3967dc4a;hp=65faf3a5ba9761b22eeaa6b0e333f62a002e4d3c;hpb=3472707ff105a1428957d98eb77b6dae29b74097;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 65faf3a5ba9..2f859486691 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -15,14 +15,13 @@ for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ +Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. */ #include "config.h" #include "system.h" #include "coretypes.h" #include "tm.h" -#include "errors.h" #include "ggc.h" #include "tree.h" #include "rtl.h" @@ -332,6 +331,8 @@ replace_phi_edge_with_variable (basic_block cond_block, { EDGE_SUCC (cond_block, 0)->flags |= EDGE_FALLTHRU; EDGE_SUCC (cond_block, 0)->flags &= ~(EDGE_TRUE_VALUE | EDGE_FALSE_VALUE); + EDGE_SUCC (cond_block, 0)->probability = REG_BR_PROB_BASE; + EDGE_SUCC (cond_block, 0)->count += EDGE_SUCC (cond_block, 1)->count; block_to_remove = EDGE_SUCC (cond_block, 1)->dest; } @@ -340,6 +341,8 @@ replace_phi_edge_with_variable (basic_block cond_block, EDGE_SUCC (cond_block, 1)->flags |= EDGE_FALLTHRU; EDGE_SUCC (cond_block, 1)->flags &= ~(EDGE_TRUE_VALUE | EDGE_FALSE_VALUE); + EDGE_SUCC (cond_block, 1)->probability = REG_BR_PROB_BASE; + EDGE_SUCC (cond_block, 1)->count += EDGE_SUCC (cond_block, 0)->count; block_to_remove = EDGE_SUCC (cond_block, 0)->dest; } @@ -721,8 +724,8 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, return false; /* We need BOUND <= LARGER. */ - if (!integer_nonzerop (fold (build2 (LE_EXPR, boolean_type_node, - bound, larger)))) + if (!integer_nonzerop (fold_build2 (LE_EXPR, boolean_type_node, + bound, larger))) return false; } else if (operand_equal_for_phi_arg_p (arg_false, smaller)) @@ -746,8 +749,8 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, return false; /* We need BOUND >= SMALLER. */ - if (!integer_nonzerop (fold (build2 (GE_EXPR, boolean_type_node, - bound, smaller)))) + if (!integer_nonzerop (fold_build2 (GE_EXPR, boolean_type_node, + bound, smaller))) return false; } else @@ -780,8 +783,8 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, return false; /* We need BOUND >= LARGER. */ - if (!integer_nonzerop (fold (build2 (GE_EXPR, boolean_type_node, - bound, larger)))) + if (!integer_nonzerop (fold_build2 (GE_EXPR, boolean_type_node, + bound, larger))) return false; } else if (operand_equal_for_phi_arg_p (arg_true, smaller)) @@ -805,8 +808,8 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, return false; /* We need BOUND <= SMALLER. */ - if (!integer_nonzerop (fold (build2 (LE_EXPR, boolean_type_node, - bound, smaller)))) + if (!integer_nonzerop (fold_build2 (LE_EXPR, boolean_type_node, + bound, smaller))) return false; } else