This is the mail archive of the
mailing list for the GCC project.
Re: [patches] Re: find_basic-blocks memory leak fix
> > On Sun, Jul 15, 2001 at 10:06:33PM +0200, Jan Hubicka wrote:
> > > integrate causes us to memory leak the basic block structures; when the
> > > CFG is built before function is saved and then, at the end of compilation
> > > the function is again proceeded by find_basic_block that attempts to reuse
> > > the data structures already freed.
> > Um, how is this different from what is done in copy_insn_list?
> > Surely we don't do any optimization after save_for_inline?
> We save for inlining and stop processing the insn. Then eventually we decide to
> output the fuction and start again. The flow_info is freed in the maintime,
> and copy_insn_list is done.
> timevar_push (TV_INTEGRATION);
> save_for_inline (decl);
> timevar_pop (TV_INTEGRATION);
> DECL_SAVED_INSNS (decl)->inlinable = inlinable;
> goto exit_rest_of_compilation;
An alternate approach would be to make flow_obstack part of current_function
structure, as we do with other datastructures we need to save/restore when
we decide to delay code generation.