aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog80
-rw-r--r--gcc/passes.c1
-rw-r--r--gcc/tree-flow.h3
-rw-r--r--gcc/tree-pass.h1
-rw-r--r--gcc/tree-ssa-dce.c2
-rw-r--r--gcc/tree-ssa-loop.c25
6 files changed, 72 insertions, 40 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d0a683b..b32d3c0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2005-09-17 Richard Henderson <rth@redhat.com>
+
+ * tree-pass.h (pass_vect_dce): Declare.
+ * passes.c (init_optimization_passes): Add it.
+ * tree-flow.h (tree_ssa_dce): Declare.
+ * tree-ssa-dce.c (tree_ssa_dce): Export.
+ * tree-ssa-loop.c (tree_vectorize): Move current_loops check ...
+ (gate_tree_vectorize): ... here.
+ (pass_vect_dce): New.
+
2005-09-17 Jan Hubicka <jh@suse.cz>
* except.c (struct eh_status): Turn region_array into vec.
@@ -400,43 +410,43 @@
2005-09-07 Richard Henderson <rth@redhat.com>
- * function.c (ARG_POINTER_CFA_OFFSET): Move ...
- * defaults.h (ARG_POINTER_CFA_OFFSET): ... here.
+ * function.c (ARG_POINTER_CFA_OFFSET): Move ...
+ * defaults.h (ARG_POINTER_CFA_OFFSET): ... here.
(INCOMING_FRAME_SP_OFFSET): Move from dwarf2out.c.
- * dwarf2out.c (struct cfa_loc): Change reg to unsigned int,
- rearrange for better packing.
+ * dwarf2out.c (struct cfa_loc): Change reg to unsigned int,
+ rearrange for better packing.
(INCOMING_FRAME_SP_OFFSET): Move to defaults.h.
- (lookup_cfa_1): Remove inline marker.
- (cfa_equal_p): Split out of ...
- (def_cfa_1): ... here. Use INVALID_REGNUM.
- (build_cfa_loc): Handle !cfa->indirect.
- (frame_pointer_cfa_offset): New.
- (dbx_reg_number): Assert register elimination performed; do
- leaf register remapping.
- (reg_loc_descriptor): Avoid calling dbx_reg_number when unused.
- (eliminate_reg_to_offset): New.
- (based_loc_descr): Remove can_use_fbreg argument. Use fbreg only
- for verifiably local stack frame addresses; re-base to CFA.
- (mem_loc_descriptor): Remove can_use_fbreg argument.
- (concat_loc_descriptor, loc_descriptor): Likewise.
- (containing_function_has_frame_base): Remove.
- (rtl_for_decl_location): Don't do register elimination or
- leaf register remapping here.
- (secname_for_decl): Split out from ..
- (add_location_or_const_value_attribute): ... here.
- (convert_cfa_to_loc_list): New.
- (compute_frame_pointer_to_cfa_displacement): New.
- (gen_subprogram_die): Use them.
- * tree.h (frame_base_decl): Remove.
- * var-tracking.c (frame_base_decl, frame_stack_adjust): Remove.
- (prologue_stack_adjust): Remove.
- (vt_stack_adjustments): Use INCOMING_FRAME_SP_OFFSET.
- (adjust_stack_reference): Re-base memories to arg_pointer_rtx.
- (set_frame_base_location): Remove.
- (compute_bb_dataflow, emit_notes_in_bb): Don't call it.
- (dump_attrs_list, dump_dataflow_set): Use string concatenation.
- (vt_add_function_parameters): Don't eliminate_regs.
- (vt_initialize): Don't create frame_base_decl.
+ (lookup_cfa_1): Remove inline marker.
+ (cfa_equal_p): Split out of ...
+ (def_cfa_1): ... here. Use INVALID_REGNUM.
+ (build_cfa_loc): Handle !cfa->indirect.
+ (frame_pointer_cfa_offset): New.
+ (dbx_reg_number): Assert register elimination performed; do
+ leaf register remapping.
+ (reg_loc_descriptor): Avoid calling dbx_reg_number when unused.
+ (eliminate_reg_to_offset): New.
+ (based_loc_descr): Remove can_use_fbreg argument. Use fbreg only
+ for verifiably local stack frame addresses; re-base to CFA.
+ (mem_loc_descriptor): Remove can_use_fbreg argument.
+ (concat_loc_descriptor, loc_descriptor): Likewise.
+ (containing_function_has_frame_base): Remove.
+ (rtl_for_decl_location): Don't do register elimination or
+ leaf register remapping here.
+ (secname_for_decl): Split out from ..
+ (add_location_or_const_value_attribute): ... here.
+ (convert_cfa_to_loc_list): New.
+ (compute_frame_pointer_to_cfa_displacement): New.
+ (gen_subprogram_die): Use them.
+ * tree.h (frame_base_decl): Remove.
+ * var-tracking.c (frame_base_decl, frame_stack_adjust): Remove.
+ (prologue_stack_adjust): Remove.
+ (vt_stack_adjustments): Use INCOMING_FRAME_SP_OFFSET.
+ (adjust_stack_reference): Re-base memories to arg_pointer_rtx.
+ (set_frame_base_location): Remove.
+ (compute_bb_dataflow, emit_notes_in_bb): Don't call it.
+ (dump_attrs_list, dump_dataflow_set): Use string concatenation.
+ (vt_add_function_parameters): Don't eliminate_regs.
+ (vt_initialize): Don't create frame_base_decl.
2005-09-07 Eric Botcazou <ebotcazou@libertysurf.fr>
diff --git a/gcc/passes.c b/gcc/passes.c
index c5b4212..bf6db2c 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -567,6 +567,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_iv_canon);
NEXT_PASS (pass_if_conversion);
NEXT_PASS (pass_vectorize);
+ NEXT_PASS (pass_vect_dce);
/* NEXT_PASS (pass_may_alias) cannot be done again because the
vectorizer creates alias relations that are not supported by
pass_may_alias. */
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index fa5c1d6..ee53971 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -707,6 +707,9 @@ struct tree_niter_desc
the loop), then the information would be lost. */
};
+/* In tree-ssa-dce.c */
+void tree_ssa_dce (void);
+
/* In tree-vectorizer.c */
void vectorize_loops (struct loops *);
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 57dc029..cca51d3 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -234,6 +234,7 @@ extern struct tree_opt_pass pass_empty_loop;
extern struct tree_opt_pass pass_record_bounds;
extern struct tree_opt_pass pass_if_conversion;
extern struct tree_opt_pass pass_vectorize;
+extern struct tree_opt_pass pass_vect_dce;
extern struct tree_opt_pass pass_complete_unroll;
extern struct tree_opt_pass pass_iv_optimize;
extern struct tree_opt_pass pass_tree_loop_done;
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index 8902d2a..e77bc60 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -935,7 +935,7 @@ perform_tree_ssa_dce (bool aggressive)
}
/* Pass entry points. */
-static void
+void
tree_ssa_dce (void)
{
perform_tree_ssa_dce (/*aggressive=*/false);
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index 692f9b1..ce62972 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -188,16 +188,13 @@ struct tree_opt_pass pass_tree_unswitch =
static void
tree_vectorize (void)
{
- if (!current_loops)
- return;
-
vectorize_loops (current_loops);
}
static bool
gate_tree_vectorize (void)
{
- return flag_tree_vectorize != 0;
+ return flag_tree_vectorize && current_loops;
}
struct tree_opt_pass pass_vectorize =
@@ -217,6 +214,26 @@ struct tree_opt_pass pass_vectorize =
0 /* letter */
};
+struct tree_opt_pass pass_vect_dce =
+{
+ "vect_dce", /* name */
+ gate_tree_vectorize, /* gate */
+ tree_ssa_dce, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_TREE_DCE, /* tv_id */
+ PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_dump_func
+ | TODO_update_ssa_no_phi
+ | TODO_cleanup_cfg
+ | TODO_ggc_collect
+ | TODO_verify_ssa, /* todo_flags_finish */
+ 0 /* letter */
+};
/* Loop nest optimizations. */