summaryrefslogtreecommitdiffstats
path: root/gcc/cfghooks.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-06 09:24:26 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-06 09:24:26 +0000
commit1026363d37d5d3828ad5f0431c89a53616c96a65 (patch)
tree366519e64f386e83f2c89bfffb438c340d608e78 /gcc/cfghooks.c
parent962ada38d119114083b176a66c840e135b9f8b75 (diff)
downloadppe42-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.c')
-rw-r--r--gcc/cfghooks.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
new file mode 100644
index 00000000000..d5815a12307
--- /dev/null
+++ b/gcc/cfghooks.c
@@ -0,0 +1,48 @@
+/* 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. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "tree.h"
+#include "rtl.h"
+#include "basic-block.h"
+
+extern struct cfg_hooks rtl_cfg_hooks;
+extern struct cfg_hooks cfg_layout_rtl_cfg_hooks;
+
+/* A pointer to one of the hooks containers. */
+struct cfg_hooks *cfg_hooks;
+
+/* Initialization of functions specific to the rtl IR. */
+void
+rtl_register_cfg_hooks ()
+{
+ cfg_hooks = &rtl_cfg_hooks;
+}
+
+/* Initialization of functions specific to the rtl IR. */
+void
+cfg_layout_rtl_register_cfg_hooks ()
+{
+ cfg_hooks = &cfg_layout_rtl_cfg_hooks;
+}
OpenPOWER on IntegriCloud