summaryrefslogtreecommitdiff
path: root/gcc/tree-chrec.h
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-12 15:23:33 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-12 15:23:33 +0000
commit9456798d72d0e81a2a553287f436dcb05cff175a (patch)
tree1e80106d0c4f828b72deb6e782c20d788c0dd818 /gcc/tree-chrec.h
parente89aee4174fe58eaba553027558144a0f423960c (diff)
downloadgcc-9456798d72d0e81a2a553287f436dcb05cff175a.tar.gz
[./]
2013-11-12 Basile Starynkevitch <basile@starynkevitch.net> {{merge with trunk GCC 4.9 svn rev 204695; previous trunk merge was 202773; very unstable...}} [gcc/] 2013-11-11 Basile Starynkevitch <basile@starynkevitch.net> {{merge with trunk GCC 4.9 svn rev 204695; very unstable}} * melt-runtime.h (MELT_VERSION_STRING): Bump to "1.0.1+". * melt-run.proto.h: Update copyright years. include tree-cfg.h instead of tree-flow.h for GCC 4.9. * melt-runtime.cc: Include tree-cfg.h not tree-flow.h for GCC 4.9. (meltgc_walk_gimple_seq): Fatal error with GCC 4.9 since the walk_use_def_chains function disappeared from GCC... * melt/xtramelt-ana-gimple.melt (walk_gimple_seq) (walk_gimple_seq_unique_tree): issue some #warning-s for GCC 4.9 because walk_use_def_chains function disappeared from GCC... * melt/xtramelt-probe.melt (probe_docmd): Issue an error since currently the MELT probe is not usable with GCC 4.9.... git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@204705 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-chrec.h')
-rw-r--r--gcc/tree-chrec.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/gcc/tree-chrec.h b/gcc/tree-chrec.h
index ad39a6b22d3..2c689d8839c 100644
--- a/gcc/tree-chrec.h
+++ b/gcc/tree-chrec.h
@@ -52,6 +52,8 @@ tree_is_chrec (const_tree expr)
}
+enum ev_direction {EV_DIR_GROWS, EV_DIR_DECREASES, EV_DIR_UNKNOWN};
+enum ev_direction scev_direction (const_tree);
/* Chrec folding functions. */
extern tree chrec_fold_plus (tree, tree, tree);
@@ -72,6 +74,8 @@ extern tree hide_evolution_in_other_loops_than_loop (tree, unsigned);
extern tree reset_evolution_in_loop (unsigned, tree, tree);
extern tree chrec_merge (tree, tree);
extern void for_each_scev_op (tree *, bool (*) (tree *, void *), void *);
+extern bool convert_affine_scev (struct loop *, tree, tree *, tree *, gimple,
+ bool);
/* Observers. */
extern bool eq_evolutions_p (const_tree, const_tree);
@@ -137,15 +141,18 @@ build_polynomial_chrec (unsigned loop_num,
|| !val)
return chrec_dont_know;
- /* Pointer types should occur only on the left hand side, i.e. in
- the base of the chrec, and not in the step. */
- gcc_assert (!POINTER_TYPE_P (TREE_TYPE (right)));
-
- /* Types of left and right sides of a chrec should be compatible. */
+ /* Types of left and right sides of a chrec should be compatible, but
+ pointer CHRECs are special in that the evolution is of ptroff type. */
if (POINTER_TYPE_P (TREE_TYPE (left)))
- gcc_assert (ptrofftype_p (TREE_TYPE (right)));
+ gcc_checking_assert (ptrofftype_p (TREE_TYPE (right)));
else
- gcc_assert (TREE_TYPE (left) == TREE_TYPE (right));
+ {
+ /* Pointer types should occur only on the left hand side, i.e. in
+ the base of the chrec, and not in the step. */
+ gcc_checking_assert (!POINTER_TYPE_P (TREE_TYPE (right))
+ && types_compatible_p (TREE_TYPE (left),
+ TREE_TYPE (right)));
+ }
if (chrec_zerop (right))
return left;