diff options
author | Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> | 2004-09-05 11:25:37 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2004-09-05 09:25:37 +0000 |
commit | 8b11a64cd99d948ac278cc508d1866c6d28df85e (patch) | |
tree | 5fe97f05e5fc6b7356f52252207207aa904b781f /gcc/tree.h | |
parent | 56fa138bafabce659967883250b202d23d697c00 (diff) | |
download | gcc-8b11a64cd99d948ac278cc508d1866c6d28df85e.zip gcc-8b11a64cd99d948ac278cc508d1866c6d28df85e.tar.gz gcc-8b11a64cd99d948ac278cc508d1866c6d28df85e.tar.bz2 |
tree-ssa-loop-ivopts.c: New file.
* tree-ssa-loop-ivopts.c: New file.
* Makefile.in (tree-ssa-loop-ivopts.c): Add.
* cfgloop.h (target_avail_regs, target_res_regs, target_small_cost,
target_pres_cost, target_spill_cost): Declare.
* cfgloopanal.c (avail_regs, res_regs, small_cost, pres_cost,
spill_cost): Renamed to ...
(target_avail_regs, target_res_regs, target_small_cost,
target_pres_cost, target_spill_cost): ... and exported.
(init_set_costs, global_cost_for_size): Work with renamed variables.
* common.opt (flag_ivopts): New flag.
* expr.c (expand_expr_real_1): Handle SSA_NAME case. Handle
REF_ORIGINAL.
* gimplify.c (struct gimplify_ctx): Add into_ssa field.
(internal_get_tmp_var, gimplify_modify_expr, gimplify_expr): Support
generating SSA form.
(force_gimple_operand): New function.
* timevar.def (TV_TREE_LOOP_IVOPTS): New timevar.
* tree-cfg.c (stmt_bsi): New function.
* params.def (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND,
PARAM_IV_MAX_CONSIDERED_USES): New.
* tree-flow.h (stmt_bsi, tree_ssa_iv_optimize, split_loop_exit_edge,
bsi_insert_on_edge_immediate_loop. standard_iv_increment_position,
ip_end_pos, ip_normal_pos, force_gimple_operand): Declare.
* tree-gimple.c (is_gimple_formal_tmp_var): Accept ssa names.
* tree-nested.c (build_addr): Export.
* tree-optimize.c (init_tree_optimization_passes): Add
pass_iv_optimize.
* tree-pass.h (pass_iv_optimize): Declare.
* tree-ssa-loop-im.c (for_each_index): Handle REALPART_EXPR and
IMAGPART_EXPR.
* tree-ssa-loop-manip.c (create_iv): Force the base to be acceptable
as a phi node argument.
(split_loop_exit_edge, bsi_insert_on_edge_immediate_loop,
ip_end_pos, ip_normal_pos, standard_iv_increment_position): New
functions.
* tree-ssa-loop-niter.c (zero_p, unsigned_type_for): Export.
* tree-ssa-loop.c (tree_ssa_loop_ivopts, gate_tree_ssa_loop_ivopts,
pass_iv_optimize): New pass.
* tree-ssa-operands.c (get_indirect_ref_operands): Handle REF_ORIGINAL.
* tree-ssanames.c (release_ssa_name): Allow calling with var = NULL.
* tree.c (build_int_cst_type, cst_and_fits_in_hwi): New functions.
* tree.h (REF_ORIGINAL): New macro.
(build_int_cst_type, unsigned_type_for, zero_p,
cst_and_fits_in_hwi, build_addr): Declare.
* doc/invoke.texi (-fivopts): Document.
(PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND,
PARAM_IV_MAX_CONSIDERED_USES): Document.
* doc/passes.texi: Document induction variable optimizations pass.
* gcc.dg/tree-ssa/loop-2.c: New test.
* gcc.dg/tree-ssa/loop-3.c: New test.
* gcc.dg/tree-ssa/loop-4.c: New test.
* gcc.dg/tree-ssa/loop-5.c: New test.
From-SVN: r87100
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1069,6 +1069,9 @@ struct tree_vec GTY(()) #define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I) #define TREE_COMPLEXITY(NODE) (EXPR_CHECK (NODE)->exp.complexity) +/* In INDIRECT_REF. */ +#define REF_ORIGINAL(NODE) TREE_CHAIN (TREE_CHECK (NODE, INDIRECT_REF)) + /* In a LABELED_BLOCK_EXPR node. */ #define LABELED_BLOCK_LABEL(NODE) \ TREE_OPERAND_CHECK_CODE (NODE, LABELED_BLOCK_EXPR, 0) @@ -2747,6 +2750,7 @@ extern tree build4_stat (enum tree_code, tree, tree, tree, tree, #define build4(c,t1,t2,t3,t4,t5) build4_stat (c,t1,t2,t3,t4,t5 MEM_STAT_INFO) extern tree build_int_cst (tree, HOST_WIDE_INT); +extern tree build_int_cst_type (tree, HOST_WIDE_INT); extern tree build_int_cstu (tree, unsigned HOST_WIDE_INT); extern tree build_int_cst_wide (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT); extern tree build_vector (tree, tree); @@ -2769,6 +2773,7 @@ extern tree build_empty_stmt (void); extern tree make_signed_type (int); extern tree make_unsigned_type (int); +extern tree unsigned_type_for (tree); extern void initialize_sizetypes (bool); extern void set_sizetype (tree); extern void fixup_unsigned_type (tree); @@ -3174,6 +3179,9 @@ extern int integer_pow2p (tree); extern int integer_nonzerop (tree); +extern bool zero_p (tree); +extern bool cst_and_fits_in_hwi (tree); + /* staticp (tree x) is nonzero if X is a reference to data allocated at a fixed address in memory. Returns the outermost data. */ @@ -3498,6 +3506,7 @@ extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int); extern tree build_range_type (tree, tree, tree); extern HOST_WIDE_INT int_cst_value (tree); extern tree tree_fold_gcd (tree, tree); +extern tree build_addr (tree); extern bool fields_compatible_p (tree, tree); extern tree find_compatible_field (tree, tree); |