diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-12 22:32:16 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-12 22:32:16 +0000 |
commit | 4f217f6965e82cb382ac08e5949f87cf9b154da3 (patch) | |
tree | 316bfa9275d9c94833734dca42a7387ce4a3d203 /gcc/cfg.c | |
parent | f75b020846b025aafeeb23c00607a8877f25ee29 (diff) | |
download | gcc-4f217f6965e82cb382ac08e5949f87cf9b154da3.tar.gz |
* basic-block.h (FOR_ALL_BB_FN): New macro.
(init_flow): Initialize cfg structure.
* function.c (allocate_struct_function): Do not initialize cfg structure.
* tree-cfg.c (init_empty_tree_cfg): Break out from ...
(build_tree_cfg): ... here.
* tree-flow.h (init_empty_tree_cfg): Declare.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99633 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfg.c')
-rw-r--r-- | gcc/cfg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cfg.c b/gcc/cfg.c index a0f326a5db7..c1cf389e69f 100644 --- a/gcc/cfg.c +++ b/gcc/cfg.c @@ -78,7 +78,9 @@ static void free_edge (edge); void init_flow (void) { - + if (!cfun->cfg) + cfun->cfg = ggc_alloc_cleared (sizeof (struct control_flow_graph)); + n_edges = 0; ENTRY_BLOCK_PTR = ggc_alloc_cleared (sizeof (struct basic_block_def)); ENTRY_BLOCK_PTR->index = ENTRY_BLOCK; EXIT_BLOCK_PTR = ggc_alloc_cleared (sizeof (struct basic_block_def)); |