diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-20 15:30:50 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-20 15:30:50 +0000 |
commit | 886c126246d0d0259113dd240b7b3e1c47368b02 (patch) | |
tree | 9e3afc6bbe5e7e9108701cba48e7a774ae350ad9 | |
parent | 6115016c6f3bc7cfdb621c8feb72f0beb4e6a4dd (diff) | |
download | gcc-886c126246d0d0259113dd240b7b3e1c47368b02.tar.gz |
2014-10-20 Andrew MacLeod <amacleod@redhat.com>
* cfgrtl.h: New. Add prototypes for cfgrtl.c.
* basic-block.h: Remove prototypes for cfgrtl.c.
* cfghooks.h (cfg_layout_initialize, cfg_layout_finalize): Move
prototypes to cfgrtl.h.
* profile.h (profile_info): Add extern export declaration.
* rtl.h: Remove prototypes for cfgrtl.h.
* tree-cfg.h (gt_ggc_mx, gt_pch_nx): Move prototypes to here.
* ipa-inline.c: Include profile.h.
* loop-unroll.c: Ditto.
* modulo-sched.c: Ditto.
* postreload-gcse.c: Ditto.
* predict.c: Ditto.
* sched-ebb.c: Ditto.
* sched-rgn.c: Ditto.
* tracer.c: Ditto.
* tree-ssa-loop-ivcanon.c: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216485 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/basic-block.h | 40 | ||||
-rw-r--r-- | gcc/cfghooks.h | 3 | ||||
-rw-r--r-- | gcc/cfgrtl.h | 58 | ||||
-rw-r--r-- | gcc/ipa-inline.c | 1 | ||||
-rw-r--r-- | gcc/loop-unroll.c | 1 | ||||
-rw-r--r-- | gcc/modulo-sched.c | 1 | ||||
-rw-r--r-- | gcc/postreload-gcse.c | 1 | ||||
-rw-r--r-- | gcc/predict.c | 2 | ||||
-rw-r--r-- | gcc/profile.h | 4 | ||||
-rw-r--r-- | gcc/rtl.h | 9 | ||||
-rw-r--r-- | gcc/sched-ebb.c | 1 | ||||
-rw-r--r-- | gcc/sched-rgn.c | 1 | ||||
-rw-r--r-- | gcc/tracer.c | 1 | ||||
-rw-r--r-- | gcc/tree-cfg.h | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 1 |
16 files changed, 97 insertions, 51 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9cf6880d8b0..cbc899c2c5e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2014-10-20 Andrew MacLeod <amacleod@redhat.com> + + * cfgrtl.h: New. Add prototypes for cfgrtl.c. + * basic-block.h: Remove prototypes for cfgrtl.c. + * cfghooks.h (cfg_layout_initialize, cfg_layout_finalize): Move + prototypes to cfgrtl.h. + * profile.h (profile_info): Add extern export declaration. + * rtl.h: Remove prototypes for cfgrtl.h. + * tree-cfg.h (gt_ggc_mx, gt_pch_nx): Move prototypes to here. + * ipa-inline.c: Include profile.h. + * loop-unroll.c: Ditto. + * modulo-sched.c: Ditto. + * postreload-gcse.c: Ditto. + * predict.c: Ditto. + * sched-ebb.c: Ditto. + * sched-rgn.c: Ditto. + * tracer.c: Ditto. + * tree-ssa-loop-ivcanon.c: Ditto. + 2014-10-20 Richard Biener <rguenther@suse.de> * tree-vect-slp.c (vect_get_and_check_slp_defs): Try swapping diff --git a/gcc/basic-block.h b/gcc/basic-block.h index a2b31275e02..829d93454ca 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "hard-reg-set.h" #include "input.h" #include "function.h" +#include "cfgrtl.h" /* Use gcov_type to hold basic block counters. Should be at least 64bit. Although a counter cannot be negative, we use a signed @@ -64,12 +65,6 @@ struct GTY((user)) edge_def { in profile.c */ }; - -/* Garbage collection and PCH support for edge_def. */ -extern void gt_ggc_mx (edge_def *e); -extern void gt_pch_nx (edge_def *e); -extern void gt_pch_nx (edge_def *e, gt_pointer_operator, void *); - /* Masks for edge.flags. */ #define DEF_EDGE_FLAG(NAME,IDX) EDGE_##NAME = 1 << IDX , enum cfg_edge_flags { @@ -87,10 +82,6 @@ enum cfg_edge_flags { #define EDGE_COMPLEX \ (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH | EDGE_PRESERVE) -/* Counter summary from the last set of coverage counts read by - profile.c. */ -extern const struct gcov_ctr_summary *profile_info; - /* Structure to gather statistic about profile consistency, per pass. An array of this structure, indexed by pass static number, is allocated in passes.c. The structure is defined here so that different CFG modes @@ -122,8 +113,6 @@ struct profile_record bool run; }; -/* Declared in cfgloop.h. */ -struct loop; struct GTY(()) rtl_bb_info { /* The first insn of the block is embedded into bb->il.x. */ @@ -391,16 +380,9 @@ struct GTY(()) control_flow_graph { /* The two blocks that are always in the cfg. */ #define NUM_FIXED_BLOCKS (2) -extern void compute_bb_for_insn (void); -extern unsigned int free_bb_for_insn (void); -extern void update_bb_for_insn (basic_block); -extern void insert_insn_on_edge (rtx, edge); basic_block split_edge_and_insert (edge, rtx_insn *); -extern void commit_one_edge_insertion (edge e); -extern void commit_edge_insertions (void); - extern edge unchecked_make_edge (basic_block, basic_block, int); extern edge cached_make_edge (sbitmap, basic_block, basic_block, int); extern edge make_edge (basic_block, basic_block, int); @@ -409,8 +391,6 @@ extern void remove_edge_raw (edge); extern void redirect_edge_succ (edge, basic_block); extern edge redirect_edge_succ_nodup (edge, basic_block); extern void redirect_edge_pred (edge, basic_block); -extern basic_block create_basic_block_structure (rtx_insn *, rtx_insn *, - rtx_note *, basic_block); extern void clear_bb_flags (void); extern void dump_bb_info (FILE *, basic_block, int, int, bool, bool); extern void dump_edge_info (FILE *, edge, int, int); @@ -797,19 +777,6 @@ extern void compute_dominance_frontiers (struct bitmap_head *); extern bitmap compute_idf (bitmap, struct bitmap_head *); extern basic_block * single_pred_before_succ_order (void); -/* In cfgrtl.c */ -extern rtx block_label (basic_block); -extern rtx_note *bb_note (basic_block); -extern bool purge_all_dead_edges (void); -extern bool purge_dead_edges (basic_block); -extern bool fixup_abnormal_edges (void); -extern basic_block force_nonfallthru_and_redirect (edge, basic_block, rtx); -extern bool contains_no_active_insn_p (const_basic_block); -extern bool forwarder_block_p (const_basic_block); -extern bool can_fallthru (basic_block, basic_block); -extern void emit_barrier_after_bb (basic_block bb); -extern void fixup_partitions (void); - /* In cfgbuild.c. */ extern void find_many_sub_basic_blocks (sbitmap); extern void rtl_make_eh_edge (sbitmap, basic_block, rtx); @@ -825,7 +792,6 @@ extern int flow_find_head_matching_sequence (basic_block, basic_block, extern bool delete_unreachable_blocks (void); -extern void update_br_prob_note (basic_block); extern bool inside_basic_block_p (const rtx_insn *); extern bool control_flow_insn_p (const rtx_insn *); extern rtx_insn *get_last_bb_insn (basic_block); @@ -875,11 +841,7 @@ extern basic_block next_dom_son (enum cdi_direction, basic_block); unsigned bb_dom_dfs_in (enum cdi_direction, basic_block); unsigned bb_dom_dfs_out (enum cdi_direction, basic_block); -extern edge try_redirect_by_replacing_jump (edge, basic_block, bool); -extern void break_superblocks (void); -extern void relink_block_chain (bool); extern void update_bb_profile_for_threading (basic_block, int, gcov_type, edge); -extern void init_rtl_bb_info (basic_block); extern void initialize_original_copy_tables (void); extern void free_original_copy_tables (void); diff --git a/gcc/cfghooks.h b/gcc/cfghooks.h index 1b8587a5b1b..6a91bd96c6c 100644 --- a/gcc/cfghooks.h +++ b/gcc/cfghooks.h @@ -208,9 +208,6 @@ extern void copy_bbs (basic_block *, unsigned, basic_block *, void account_profile_record (struct profile_record *, int); -extern void cfg_layout_initialize (unsigned int); -extern void cfg_layout_finalize (void); - /* Hooks containers. */ extern struct cfg_hooks gimple_cfg_hooks; extern struct cfg_hooks rtl_cfg_hooks; diff --git a/gcc/cfgrtl.h b/gcc/cfgrtl.h new file mode 100644 index 00000000000..96668ed6872 --- /dev/null +++ b/gcc/cfgrtl.h @@ -0,0 +1,58 @@ +/* Define control flow data structures for the CFG. + Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. */ + +#ifndef GCC_CFGRTL_H +#define GCC_CFGRTL_H + +extern void delete_insn (rtx); +extern void delete_insn_and_edges (rtx_insn *); +extern void delete_insn_chain (rtx, rtx, bool); +extern basic_block create_basic_block_structure (rtx_insn *, rtx_insn *, + rtx_note *, basic_block); +extern void compute_bb_for_insn (void); +extern unsigned int free_bb_for_insn (void); +extern rtx_insn *entry_of_function (void); +extern void update_bb_for_insn (basic_block); +extern bool contains_no_active_insn_p (const_basic_block); +extern bool forwarder_block_p (const_basic_block); +extern bool can_fallthru (basic_block, basic_block); +extern rtx_note *bb_note (basic_block); +extern rtx block_label (basic_block); +extern edge try_redirect_by_replacing_jump (edge, basic_block, bool); +extern void emit_barrier_after_bb (basic_block bb); +extern basic_block force_nonfallthru_and_redirect (edge, basic_block, rtx); +extern void insert_insn_on_edge (rtx, edge); +extern void commit_one_edge_insertion (edge e); +extern void commit_edge_insertions (void); +extern void print_rtl_with_bb (FILE *, const rtx_insn *, int); +extern void update_br_prob_note (basic_block); +extern rtx_insn *get_last_bb_insn (basic_block); +extern void fixup_partitions (void); +extern bool purge_dead_edges (basic_block); +extern bool purge_all_dead_edges (void); +extern bool fixup_abnormal_edges (void); +extern rtx_insn *unlink_insn_chain (rtx_insn *, rtx_insn *); +extern void relink_block_chain (bool); +extern rtx_insn *duplicate_insn_chain (rtx_insn *, rtx_insn *); +extern void cfg_layout_initialize (unsigned int); +extern void cfg_layout_finalize (void); +extern void break_superblocks (void); +extern void init_rtl_bb_info (basic_block); + +#endif /* GCC_CFGRTL_H */ diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 9ac19298c19..e79a4dd8e21 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -108,6 +108,7 @@ along with GCC; see the file COPYING3. If not see #include "coverage.h" #include "rtl.h" #include "bitmap.h" +#include "profile.h" #include "basic-block.h" #include "tree-ssa-alias.h" #include "internal-fn.h" diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index 2abb2f4d8d8..c9a08124de5 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "hard-reg-set.h" #include "obstack.h" +#include "profile.h" #include "basic-block.h" #include "cfgloop.h" #include "params.h" diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c index 5a44cbf97af..52cc37628c3 100644 --- a/gcc/modulo-sched.c +++ b/gcc/modulo-sched.c @@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see #include "machmode.h" #include "input.h" #include "function.h" +#include "profile.h" #include "flags.h" #include "insn-config.h" #include "insn-attr.h" diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c index d6fa3d13ef2..03b054a30cd 100644 --- a/gcc/postreload-gcse.c +++ b/gcc/postreload-gcse.c @@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see #include "machmode.h" #include "input.h" #include "function.h" +#include "profile.h" #include "expr.h" #include "except.h" #include "intl.h" diff --git a/gcc/predict.c b/gcc/predict.c index 29e3c79f98b..5f5d4a55c9c 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see #include "machmode.h" #include "input.h" #include "function.h" +#include "profile.h" #include "except.h" #include "diagnostic-core.h" #include "recog.h" @@ -2527,6 +2528,7 @@ struct edge_prob_info }; #define BLOCK_INFO(B) ((block_info *) (B)->aux) +#undef EDGE_INFO #define EDGE_INFO(E) ((edge_prob_info *) (E)->aux) /* Helper function for estimate_bb_frequencies. diff --git a/gcc/profile.h b/gcc/profile.h index d5d74f532c1..12759647912 100644 --- a/gcc/profile.h +++ b/gcc/profile.h @@ -48,6 +48,10 @@ extern void del_node_map (void); extern void get_working_sets (void); +/* Counter summary from the last set of coverage counts read by + profile.c. */ +extern const struct gcov_ctr_summary *profile_info; + /* In predict.c. */ extern gcov_type get_hot_bb_threshold (void); extern void set_hot_bb_threshold (gcov_type); diff --git a/gcc/rtl.h b/gcc/rtl.h index 5a34fea283f..496d824fb6a 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -3372,12 +3372,7 @@ extern void add_insn_before (rtx, rtx, basic_block); extern void add_insn_after (rtx, rtx, basic_block); extern void remove_insn (rtx); extern rtx_insn *emit (rtx); -extern void delete_insn (rtx); -extern rtx_insn *entry_of_function (void); extern void emit_insn_at_entry (rtx); -extern void delete_insn_chain (rtx, rtx, bool); -extern rtx_insn *unlink_insn_chain (rtx_insn *, rtx_insn *); -extern void delete_insn_and_edges (rtx_insn *); extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx); extern rtx gen_const_mem (enum machine_mode, rtx); extern rtx gen_frame_mem (enum machine_mode, rtx); @@ -3443,10 +3438,6 @@ extern rtx move_by_pieces (rtx, rtx, unsigned HOST_WIDE_INT, extern HOST_WIDE_INT find_args_size_adjust (rtx_insn *); extern int fixup_args_size_notes (rtx_insn *, rtx_insn *, int); -/* In cfgrtl.c */ -extern void print_rtl_with_bb (FILE *, const rtx_insn *, int); -extern rtx_insn *duplicate_insn_chain (rtx_insn *, rtx_insn *); - /* In expmed.c */ extern void init_expmed (void); extern void expand_inc (rtx, rtx); diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c index 3930ff5f71d..d30fa2e30a1 100644 --- a/gcc/sched-ebb.c +++ b/gcc/sched-ebb.c @@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see #include "machmode.h" #include "input.h" #include "function.h" +#include "profile.h" #include "flags.h" #include "insn-config.h" #include "insn-attr.h" diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 83110d088b9..97bc360582e 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -58,6 +58,7 @@ along with GCC; see the file COPYING3. If not see #include "machmode.h" #include "input.h" #include "function.h" +#include "profile.h" #include "flags.h" #include "insn-config.h" #include "insn-attr.h" diff --git a/gcc/tracer.c b/gcc/tracer.c index 438841ec23e..b72bcb50321 100644 --- a/gcc/tracer.c +++ b/gcc/tracer.c @@ -40,6 +40,7 @@ #include "tree.h" #include "rtl.h" #include "hard-reg-set.h" +#include "profile.h" #include "basic-block.h" #include "fibheap.h" #include "flags.h" diff --git a/gcc/tree-cfg.h b/gcc/tree-cfg.h index 751d0a29e5a..1e23fac923d 100644 --- a/gcc/tree-cfg.h +++ b/gcc/tree-cfg.h @@ -24,6 +24,11 @@ along with GCC; see the file COPYING3. If not see /* Location to track pending stmt for edge insertion. */ #define PENDING_STMT(e) ((e)->insns.g) +/* Garbage collection and PCH support for edge_def. */ +extern void gt_ggc_mx (edge_def *e); +extern void gt_pch_nx (edge_def *e); +extern void gt_pch_nx (edge_def *e, gt_pointer_operator, void *); + extern void init_empty_tree_cfg_for_function (struct function *); extern void init_empty_tree_cfg (void); extern void fold_cond_expr_cond (void); diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index 136b235a205..8ab4ad784f1 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see #include "tm.h" #include "tree.h" #include "tm_p.h" +#include "profile.h" #include "basic-block.h" #include "gimple-pretty-print.h" #include "tree-ssa-alias.h" |