diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-06 09:24:26 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-06 09:24:26 +0000 |
commit | 1026363d37d5d3828ad5f0431c89a53616c96a65 (patch) | |
tree | 366519e64f386e83f2c89bfffb438c340d608e78 /gcc/cfghooks.h | |
parent | 962ada38d119114083b176a66c840e135b9f8b75 (diff) | |
download | ppe42-gcc-1026363d37d5d3828ad5f0431c89a53616c96a65.tar.gz ppe42-gcc-1026363d37d5d3828ad5f0431c89a53616c96a65.zip |
* function.c (FLOOR_ROUND, CEIL_ROUND): Fix.
* i386.md (gen_pro_epilogue_adjust_stack): Deal with gigantic stack frames.
(pro_epilogue_adjust_stack_rex64_2): New pattern
* cfghooks.h, cfghooks.c: New files.
* Makefile.in (BASIC_BLOCK_H): Depends on cfghooks.h.
(OBJS): Add cfghooks.o.
(cfghooks.o): New rule.
* basic-block.h (split_edge): Rename to rtl_split_edge.
(verify_flow_info): Rename to rtl_verify_flow_info.
(cfghooks.h): Included here.
* cfgrtl.c (split_edge): Renamed rtl_split_edge.
(verify_flow_info): Renamed rtl_verify_flow_info.
* toplev.c (rest_of_compilation): Call rtl_register_cfg_hooks.
* basic-block.h (split_block, split_edge, flow_delete_block,
redirect_edge_and_branch, redirect_edge_and_branch_force): Delete.
(flow_delete_block_noexpunge): Return void.
* cfg.c (verify_flow_info): New function.
* cfgcleanup.c (try_simplify_condjump, outgoing_edges_match,
try_crossjump_to_edge, try_optimize_cfg, delete_unreachable_blocks):
Use delete_block.
* cfglayout.c (function_footer): Rename to...
(cfg_layout_function_footer): ... this variable
(unlink_insn_chain): Make global.
(fixup_reorder_chain, record_effective_endpoints): Update.
(cleanup_unconditional_jumps): Use delete_block.
(cfg_layout_redirect_edge, cfg_layout_split_block): Move to cfgrtl.c
(cfg_layout_duplicate_bb): Use redirect_edge_and_branch_force.
(cfg_layout_initialize, cfg_layout_finalize): Update hooks.
* cfglayout.h (cfg_layout_redirect_edge, cfg_layout_split_block): Delete.
(cfg_layout_function_footer): Declare.
* cfgloopmanip (split_loop_bb): Do not update RBI.
(remove_bbs): Use delete_block.
(loop_reidrect_edge, loop_delete_branch_edge): Use
redirect_edge_and_branch.
(create_preheader): Use split_block and redirect_edge_and_branch_force.
(split_edge_with): Likewise.
* cfgrtl.c: Include cfglayout.h
(split_edge): Rename to ...
(rtl_split_edge) ... this one; make local.
(redirect_edge_and_branch): Rename to ...
(rtl_redirect_edge_and_branch) ... this one; make local.
(redirect_edge_and_branch_force): Rename to ...
(rtl_redirect_edge_and_branch_force) ... this one; make local.
(cfg_layout_delete_block, cfg_layout_delete_edge_and_branch_force): New.
(cfg_layout_redirect_edge_and_branch, cfg_layout_split_block): Move here from
cfglayout.c; update to directly call RTL counterparts.
(rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): New functions.
* ifcvt.c (find_cond_trap): Use delete_block.
(find_if_case_1): Use delete_block.
(find_if_case_2): Use delete_block.
* rtl.h (unlink_insn_chain): Declare.
* toplev.c (rtl_reigster_cfg_hooks): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67535 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfghooks.h')
-rw-r--r-- | gcc/cfghooks.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/gcc/cfghooks.h b/gcc/cfghooks.h new file mode 100644 index 00000000000..c214b64cdc0 --- /dev/null +++ b/gcc/cfghooks.h @@ -0,0 +1,70 @@ +/* Hooks for cfg representation specific functions. + Copyright (C) 2003 Free Software Foundation, Inc. + Contributed by Sebastian Pop <s.pop@laposte.net> + +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 2, 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 COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#ifndef GCC_CFGHOOKS_H +#define GCC_CFGHOOKS_H + +struct cfg_hooks +{ + /* Debugging. Do not use macros to hook these so they can be called from + debugger! */ + void (*cfgh_verify_flow_info) PARAMS ((void)); + + /* Basic CFG manipulation. */ + + /* Redirect edge E to the given basic block B and update underlying program + representation. Returns false when edge is not easilly redirectable for + whatever reason. */ + bool (*redirect_edge_and_branch) PARAMS ((edge e, basic_block b)); + + /* Same as the above but allows redirecting of fallthru edges. In that case + newly created forwarder basic block is returned. It aborts when called + on abnormal edge. */ + basic_block (*redirect_edge_and_branch_force)PARAMS ((edge, basic_block)); + + /* Remove given basic block and all edges possibly pointing into it. */ + void (*delete_block)PARAMS ((basic_block)); + + /* Split basic block B after specified instruction I. */ + edge (*split_block) PARAMS ((basic_block b, void * i)); + + /* Higher level functions representable by primitive operations above if + we didn't have some oddities in RTL and Tree representations. */ + basic_block (*cfgh_split_edge) PARAMS ((edge)); +}; + +#define redirect_edge_and_branch(e,b) cfg_hooks->redirect_edge_and_branch (e,b) +#define redirect_edge_and_branch_force(e,b) cfg_hooks->redirect_edge_and_branch_force (e,b) +#define split_block(e,i) cfg_hooks->split_block (e,i) +#define delete_block(b) cfg_hooks->delete_block (b) +#define split_edge(e) cfg_hooks->cfgh_split_edge (e) + +/* Hooks containers. */ +extern struct cfg_hooks rtl_cfg_hooks; + +/* A pointer to one of the hooks containers. */ +extern struct cfg_hooks *cfg_hooks; + +/* Declarations. */ +extern void rtl_register_cfg_hooks PARAMS ((void)); +extern void cfg_layout_rtl_register_cfg_hooks PARAMS ((void)); + +#endif /* GCC_CFGHOOKS_H */ |