[gfortran,patch] Inline remaining allocation/deallocation routines

Richard Guenther richard.guenther@gmail.com
Mon Aug 27 13:40:00 GMT 2007


On 8/27/07, François-Xavier Coudert <fxcoudert@gmail.com> wrote:
> Hi all,
>
> Following the removal of _gfortran_internal_free and
> _gfortran_internal_malloc and the switch to emitting inline code for
> them, here is a patch that removes the last front-end calls to
> routines in libgfortran/runtime/memory.c. This is done to:
>   * allow further optimisation by the middle-end
>   * in particular, there are cases where (with current mainline) we
> create STATUS variable that are passed to the library and then
> discarded (for failproof deallocation at the end of procedures); in
> this case, the front-end now doesn't emit the unnecessary code
>   * the new scheme allows for easy instrumentalisation of the
> allocation/deallocation routines. I intend to provide (in 4.4) an
> -fmem-check option that registers allocations and deallocations,
> allowing the detection of memory leaks.
>
> Built (not bootstrapped) and regtested on i686-darwin. I'm in not
> position to compile and run cp2k and other "extended" testsuites, if
> anyone has time and resources to do it, I'd appreciate it.
>
> OK to commit? (This will also require approval from a middle-end maintainer.)

The middle-end parts are ok.

Thanks,
Richard.



More information about the Gcc-patches mailing list