CodeGen and cleaning up initializers

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CodeGen and cleaning up initializers

Axel Naumann
Hi,

For our interpreter cling we do "incremental codegen": as C++ code lines
(aka top level decls) come by we CodeGen them. But of course we cannot
re-run initializers.

Attached patch would allow us to simply remove the initializer function
from the module and have it (and all C++ initializers) rebuilt
incrementally. I would expect the cost for regular use cases to be close
to zero.

If you can come up with a better (faster / less intrusive) way of doing
things please let me know! Otherwise I'd like to commit it.

Cheers, Axel.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

CodeGen_clear_global_emits.diff (518 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: CodeGen and cleaning up initializers

Douglas Gregor

On May 3, 2011, at 8:58 AM, Axel Naumann wrote:

> Hi,
>
> For our interpreter cling we do "incremental codegen": as C++ code lines
> (aka top level decls) come by we CodeGen them. But of course we cannot
> re-run initializers.
>
> Attached patch would allow us to simply remove the initializer function
> from the module and have it (and all C++ initializers) rebuilt
> incrementally. I would expect the cost for regular use cases to be close
> to zero.
>
> If you can come up with a better (faster / less intrusive) way of doing
> things please let me know! Otherwise I'd like to commit it.

This looks fine to me. Patches should typically go to cfe-commits, though.

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev