This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 02/16] gcc: Embed the driver in-process within libgccjit

On Mon, Jun 1, 2015 at 11:04 PM, David Malcolm <> wrote:
> Provide a way to clean up state within the driver code, and use this
> from libgccjit to embed it in-process, rather that via pex.  Part of
> this requires restoring the environment after any putenv calls, so the
> patch introduces an env_manager class.  No effort is made to restore
> the environment for the classic use-case.
> This embedding gives a slight performance win for
> jit.dg/test-benchmark.c, and enables bigger performance gains in
> followup patches.
> I've fixed the worst of the memory leaks, but this does still
> leak somewhat.
> gcc/ChangeLog:
>         * gcc-main.c (main): Add params to driver ctor.
>         * gcc.c (class env_manager): New.
>         (env): New global.
>         (env_manager::init): New.
>         (env_manager::getenv): New.
>         (env_manager::xputenv): New.
>         (env_manager::restore): New.
>         Poison genenv and putenv.

getenv? The same applies to the actual #pragma statement.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]