aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-01-13 20:14:03 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2014-01-13 20:14:03 +0100
commit19e51b409e89cb13f388bf2442e3d00b904dddde (patch)
tree3287f7d4ff23c203c29bc715bc7a4141b0081b4c /gcc/gimple-fold.h
parentcd794ed4c2424b3381a5fb09c6f08e53ae919a8a (diff)
downloadgcc-19e51b409e89cb13f388bf2442e3d00b904dddde.zip
gcc-19e51b409e89cb13f388bf2442e3d00b904dddde.tar.gz
gcc-19e51b409e89cb13f388bf2442e3d00b904dddde.tar.bz2
re PR tree-optimization/59387 (wrong code (hangs) at -Os on x86_64-linux-gnu)
PR tree-optimization/59387 * tree-scalar-evolution.c: Include gimple-fold.h and gimplify-me.h. (scev_const_prop): If folded_casts and type has undefined overflow, use force_gimple_operand instead of force_gimple_operand_gsi and for each added stmt if it is assign with arith_code_with_undefined_signed_overflow, call rewrite_to_defined_overflow. * tree-ssa-loop-im.c: Don't include gimplify-me.h, include gimple-fold.h instead. (arith_code_with_undefined_signed_overflow, rewrite_to_defined_overflow): Moved to ... * gimple-fold.c (arith_code_with_undefined_signed_overflow, rewrite_to_defined_overflow): ... here. No longer static. Include gimplify-me.h. * gimple-fold.h (arith_code_with_undefined_signed_overflow, rewrite_to_defined_overflow): New prototypes. * gcc.c-torture/execute/pr59387.c: New test. From-SVN: r206583
Diffstat (limited to 'gcc/gimple-fold.h')
-rw-r--r--gcc/gimple-fold.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimple-fold.h b/gcc/gimple-fold.h
index a96be63..886cd02 100644
--- a/gcc/gimple-fold.h
+++ b/gcc/gimple-fold.h
@@ -40,5 +40,7 @@ extern tree fold_const_aggregate_ref (tree);
extern tree gimple_get_virt_method_for_binfo (HOST_WIDE_INT, tree);
extern bool gimple_val_nonnegative_real_p (tree);
extern tree gimple_fold_indirect_ref (tree);
+extern bool arith_code_with_undefined_signed_overflow (tree_code);
+extern gimple_seq rewrite_to_defined_overflow (gimple);
#endif /* GCC_GIMPLE_FOLD_H */