• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GCC with patches for OS216


Commit MetaInfo

修订版019d6598357659e05640cf762b75e18953f70fe9 (tree)
时间2016-07-07 20:50:55
作者Jan Hubicka <jh@suse...>
CommiterJan Hubicka

Log Message

tree-scalar-evolution.c (iv_can_overflow_p): export.

* tree-scalar-evolution.c (iv_can_overflow_p): export.
* tree-scalar-evolution.h (iv_can_overflow_p): Declare.
* tree-ssa-loop-ivopts.c (alloc_iv): Use it.

From-SVN: r238088

更改概述

差异

--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
1+2016-07-07 Jan Hubicka <jh@suse.cz>
2+
3+ * tree-scalar-evolution.c (iv_can_overflow_p): export.
4+ * tree-scalar-evolution.h (iv_can_overflow_p): Declare.
5+ * tree-ssa-loop-ivopts.c (alloc_iv): Use it.
6+
17 2016-07-07 Ilya Enkovich <ilya.enkovich@intel.com>
28
39 PR ipa/71624
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -3317,7 +3317,7 @@ scev_reset (void)
33173317 use this test even for derived IVs not computed every iteration or
33183318 hypotetical IVs to be inserted into code. */
33193319
3320-static bool
3320+bool
33213321 iv_can_overflow_p (struct loop *loop, tree type, tree base, tree step)
33223322 {
33233323 widest_int nit;
--- a/gcc/tree-scalar-evolution.h
+++ b/gcc/tree-scalar-evolution.h
@@ -38,6 +38,7 @@ extern unsigned int scev_const_prop (void);
3838 extern bool expression_expensive_p (tree);
3939 extern bool simple_iv (struct loop *, struct loop *, tree, struct affine_iv *,
4040 bool);
41+extern bool iv_can_overflow_p (struct loop *, tree, tree, tree);
4142 extern tree compute_overall_effect_of_inner_loop (struct loop *, tree);
4243
4344 /* Returns the basic block preceding LOOP, or the CFG entry block when
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -1181,6 +1181,10 @@ alloc_iv (struct ivopts_data *data, tree base, tree step,
11811181 iv->biv_p = false;
11821182 iv->nonlin_use = NULL;
11831183 iv->ssa_name = NULL_TREE;
1184+ if (!no_overflow
1185+ && !iv_can_overflow_p (data->current_loop, TREE_TYPE (base),
1186+ base, step))
1187+ no_overflow = true;
11841188 iv->no_overflow = no_overflow;
11851189 iv->have_address_use = false;
11861190