diff options
author | Richard Guenther <rguenther@suse.de> | 2012-08-13 13:49:54 +0000 |
---|---|---|
committer | Richard Guenther <rguenther@suse.de> | 2012-08-13 13:49:54 +0000 |
commit | dd2af256dfd5822b0d338fc676c27aa220da189b (patch) | |
tree | c9e7c894d3f7d2eaf1bfddbb370a7e8c883063c2 /gcc/tree-ssa-forwprop.c | |
parent | 7940134c2d1b53f4758fffaa6e8676dd4d305eb1 (diff) |
2012-08-13 Richard Guenther <rguenther@suse.de>
* basic-block.h (struct basic_block): Remove loop_depth
member, move flags and index members next to each other.
* cfgloop.h (bb_loop_depth): New inline function.
* cfghooks.c (split_block): Do not set loop_depth.
(duplicate_block): Likewise.
* cfgloop.c (flow_loop_nodes_find): Likewise.
(flow_loops_find): Likewise.
(add_bb_to_loop): Likewise.
(remove_bb_from_loops): Likewise.
* cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
* gimple-streamer-in.c (input_bb): Do not stream loop_depth.
* gimple-streamer-out.c (output_bb): Likewise.
* bt-load.c: Include cfgloop.h.
(migrate_btr_defs): Use bb_loop_depth.
* cfg.c (dump_bb_info): Likewise.
* final.c (compute_alignments): Likewise.
* ira.c (update_equiv_regs): Likewise.
* tree-ssa-copy.c (init_copy_prop): Likewise.
* tree-ssa-dom.c (loop_depth_of_name): Likewise.
* tree-ssa-forwprop.c: Include cfgloop.h.
(forward_propagate_addr_expr): Use bb_loop_depth.
* tree-ssa-pre.c (insert_into_preds_of_block): Likewise.
* tree-ssa-sink.c (select_best_block): Likewise.
* ipa-inline-analysis.c: Include cfgloop.h.
(estimate_function_body_sizes): Use bb_loop_depth.
* Makefile.in (tree-ssa-forwprop.o): Depend on $(CFGLOOP_H).
(ipa-inline-analysis.o): Likewise.
(bt-load.o): Likewise.
* gcc.dg/tree-prof/update-loopch.c: Adjust.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190346 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 662fe49bb83..78e17a55582 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "flags.h" #include "gimple.h" #include "expr.h" +#include "cfgloop.h" /* This pass propagates the RHS of assignment statements into use sites of the LHS of the assignment. It's basically a specialized @@ -1002,7 +1003,7 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs, static bool forward_propagate_addr_expr (tree name, tree rhs) { - int stmt_loop_depth = gimple_bb (SSA_NAME_DEF_STMT (name))->loop_depth; + int stmt_loop_depth = bb_loop_depth (gimple_bb (SSA_NAME_DEF_STMT (name))); imm_use_iterator iter; gimple use_stmt; bool all = true; @@ -1025,7 +1026,7 @@ forward_propagate_addr_expr (tree name, tree rhs) /* If the use is in a deeper loop nest, then we do not want to propagate non-invariant ADDR_EXPRs into the loop as that is likely adding expression evaluations into the loop. */ - if (gimple_bb (use_stmt)->loop_depth > stmt_loop_depth + if (bb_loop_depth (gimple_bb (use_stmt)) > stmt_loop_depth && !is_gimple_min_invariant (rhs)) { all = false; |