diff options
author | Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> | 2004-07-10 06:57:58 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2004-07-10 04:57:58 +0000 |
commit | a7e5372d6a8e2f12b6d9a15f71d5ad0794e6507f (patch) | |
tree | 7fd5b8c64fe84e6fadd94b6c98bdd7f62f3789a2 /gcc/tree.h | |
parent | ad6e2a18c2013863e1cf448471e1fa243403eb50 (diff) | |
download | gcc-a7e5372d6a8e2f12b6d9a15f71d5ad0794e6507f.zip gcc-a7e5372d6a8e2f12b6d9a15f71d5ad0794e6507f.tar.gz gcc-a7e5372d6a8e2f12b6d9a15f71d5ad0794e6507f.tar.bz2 |
tree-ssa-loop-im.c: New file.
* tree-ssa-loop-im.c: New file.
* Makefile.in (tree-ssa-loop-im.o): Add.
* cfgloop.c (superloop_at_depth): New function.
* cfgloop.h (superloop_at_depth): Declare.
* common.opt (ftree-lim): New flag.
* expr.c (array_ref_up_bound): New function.
* params.def (PARAM_LIM_EXPENSIVE): New parameter.
* timevar.def (TV_LIM): New timevar.
* tree-dfa.c (compute_immediate_uses): Respect TDFA_USE flags when
computing immediate uses of a phi node.
* tree-flow.h (struct tree_ann_common_d): Add aux field.
(loop_commit_inserts, for_each_index, tree_ssa_lim): Declare.
* tree-optimize.c (init_tree_optimization_passes): Add pass_lim.
* tree-pass.h (pass_lim): Declare.
* tree-ssa-loop.c (tree_ssa_loop_im, gate_tree_ssa_loop_im): New
functions.
(pass_lim): New pass structure.
* tree-eh.c (tree_could_trap_p): Handle ARRAY_REFs correctly.
* tree.c (in_array_bounds_p): New function.
* tree.h (TREE_THIS_NOTRAP): Define also for ARRAY_REFs.
(in_array_bounds_p, array_ref_up_bound): Declare.
* doc/invoke.texi (-ftree-lim, --param lim-expensive): Document.
* doc/passes.texi (tree-ssa-loop-im.c): Document.
From-SVN: r84441
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -303,7 +303,7 @@ struct tree_common GTY(()) ..._TYPE TREE_THIS_NOTRAP in - INDIRECT_REF + INDIRECT_REF, ARRAY_REF, ARRAY_RANGE_REF deprecated_flag: @@ -798,7 +798,12 @@ extern void tree_operand_check_failed (int, enum tree_code, /* Nonzero means this node will not trap. In an INDIRECT_REF, means accessing the memory pointed to won't generate a trap. However, this only applies to an object when used appropriately: it doesn't - mean that writing a READONLY mem won't trap. */ + mean that writing a READONLY mem won't trap. + + In ARRAY_REF and ARRAY_RANGE_REF means that we know that the index + (or slice of the array) always belongs to the range of the array. + I.e. that the access will not trap, provided that the access to + the base to the array will not trap. */ #define TREE_THIS_NOTRAP(NODE) ((NODE)->common.nothrow_flag) /* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node, @@ -2722,6 +2727,7 @@ extern tree build_method_type (tree, tree); extern tree build_offset_type (tree, tree); extern tree build_complex_type (tree); extern tree array_type_nelts (tree); +extern bool in_array_bounds_p (tree); extern tree value_member (tree, tree); extern tree purpose_member (tree, tree); @@ -3256,6 +3262,11 @@ extern tree array_ref_element_size (tree); extern tree array_ref_low_bound (tree); +/* Return a tree representing the upper bound of the array mentioned in + EXP, an ARRAY_REF. */ + +extern tree array_ref_up_bound (tree); + /* Return a tree representing the offset, in bytes, of the field referenced by EXP. This does not include any offset in DECL_FIELD_BIT_OFFSET. */ |