summaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-16 22:29:52 +0000
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-16 22:29:52 +0000
commit389dd41bd043170e7dc7660304f14a5f16af3562 (patch)
treee4de0ffc0a0ca77f35b03bf9e8a248a4b5735f6a /gcc/tree-if-conv.c
parentc1c67b4f5041c4367842002c81ffe912ff97f2d8 (diff)
downloadgcc-389dd41bd043170e7dc7660304f14a5f16af3562.tar.gz
2009-07-17 Aldy Hernandez <aldyh@redhat.com>
Manuel López-Ibáñez <manu@gcc.gnu.org> PR 40435 * tree-complex.c, tree-loop-distribution.c, tree.c, tree.h, builtins.c, fold-const.c, omp-low.c, cgraphunit.c, tree-ssa-ccp.c, tree-ssa-dom.c, gimple-low.c, expr.c, tree-ssa-ifcombine.c, c-decl.c, stor-layout.c, tree-if-conv.c, c-typeck.c, gimplify.c, calls.c, tree-sra.c, tree-mudflap.c, tree-ssa-copy.c, tree-ssa-forwprop.c, c-convert.c, c-omp.c, varasm.c, tree-inline.c, c-common.c, c-common.h, gimple.c, tree-switch-conversion.c, gimple.h, tree-cfg.c, c-parser.c, convert.c: Add location argument to fold_{unary,binary,ternary}, fold_build[123], build_call_expr, build_size_arg, build_fold_addr_expr, build_call_array, non_lvalue, size_diffop, fold_build1_initializer, fold_build2_initializer, fold_build3_initializer, fold_build_call_array, fold_build_call_array_initializer, fold_single_bit_test, omit_one_operand, omit_two_operands, invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref, combine_comparisons, fold_builtin_*, fold_call_expr, build_range_check, maybe_fold_offset_to_address, round_up, round_down. objc/ * objc-act.c: Add location argument to all calls to build_fold_addr_expr. testsuite/ * gcc.dg/pr36902.c: Add column info. * g++.dg/gcov/gcov-2.C: Change count for definition. cp/ * typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c, tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c, call.c, cvt.c, mangle.c: Add location argument to fold_{unary,binary,ternary}, fold_build[123], build_call_expr, build_size_arg, build_fold_addr_expr, build_call_array, non_lvalue, size_diffop, fold_build1_initializer, fold_build2_initializer, fold_build3_initializer, fold_build_call_array, fold_build_call_array_initializer, fold_single_bit_test, omit_one_operand, omit_two_operands, invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref, combine_comparisons, fold_builtin_*, fold_call_expr, build_range_check, maybe_fold_offset_to_address, round_up, round_down. fortran/ * trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c, trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location argument to fold_{unary,binary,ternary}, fold_build[123], build_call_expr, build_size_arg, build_fold_addr_expr, build_call_array, non_lvalue, size_diffop, fold_build1_initializer, fold_build2_initializer, fold_build3_initializer, fold_build_call_array, fold_build_call_array_initializer, fold_single_bit_test, omit_one_operand, omit_two_operands, invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref, combine_comparisons, fold_builtin_*, fold_call_expr, build_range_check, maybe_fold_offset_to_address, round_up, round_down. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149722 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r--gcc/tree-if-conv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index c1b05328fa6..bfd0c293156 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -271,10 +271,11 @@ tree_if_convert_cond_stmt (struct loop *loop, gimple stmt, tree cond,
{
tree c, c2;
edge true_edge, false_edge;
+ location_t loc = gimple_location (stmt);
gcc_assert (gimple_code (stmt) == GIMPLE_COND);
- c = fold_build2 (gimple_cond_code (stmt), boolean_type_node,
+ c = fold_build2_loc (loc, gimple_cond_code (stmt), boolean_type_node,
gimple_cond_lhs (stmt), gimple_cond_rhs (stmt));
extract_true_false_edges_from_block (gimple_bb (stmt),
@@ -286,7 +287,7 @@ tree_if_convert_cond_stmt (struct loop *loop, gimple stmt, tree cond,
add_to_dst_predicate_list (loop, true_edge, cond, c, gsi);
/* If 'c' is false then FALSE_EDGE is taken. */
- c2 = invert_truthvalue (unshare_expr (c));
+ c2 = invert_truthvalue_loc (loc, unshare_expr (c));
add_to_dst_predicate_list (loop, false_edge, cond, c2, gsi);
/* Now this conditional statement is redundant. Remove it.
@@ -615,7 +616,8 @@ add_to_predicate_list (basic_block bb, tree new_cond)
tree cond = (tree) bb->aux;
if (cond)
- cond = fold_build2 (TRUTH_OR_EXPR, boolean_type_node,
+ cond = fold_build2_loc (EXPR_LOCATION (cond),
+ TRUTH_OR_EXPR, boolean_type_node,
unshare_expr (cond), new_cond);
else
cond = new_cond;