[llvm-commits] Patch: add doInitialization and doFinalization to module passes

Eric Christopher echristo at gmail.com
Wed Nov 14 15:28:40 PST 2012


Patch itself looks ok if everyone is OK with the behavior.

-eric


On Wed, Nov 14, 2012 at 3:26 PM, Evan Cheng <evan.cheng at apple.com> wrote:

> Right, we were debating the alternative approach. Our conclusion is it
> will also require changes to out-of-tree projects. doInit / doFini approach
> has the benefit of keeping the api consistent for different types of passes.
>
> Pedro, when the change is accepted please send an email to llvmdev to make
> people aware of the API change. Not everyone is reading llvm-commits
> closely.
>
> Evan
>
> On Nov 14, 2012, at 2:52 PM, Pedro Artigas <partigas at apple.com> wrote:
>
> Hello All,
>
> reset was considered but doInitialization/doFinalization is closer to the
> model used for FunctionPasses Today so it should cause less confusion.
>
> Pedro
>
> On Nov 14, 2012, at 2:49 PM, Eric Christopher <echristo at gmail.com> wrote:
>
> Thought Evan was saying something about a resetPass call maybe instead of
> the doInit/run/doFini scheme? I'm not sure if there have been offline talks
> in addition.
>
> -eric
>
>
> On Wed, Nov 14, 2012 at 2:40 PM, Pedro Artigas <partigas at apple.com> wrote:
>
>> Hello All,
>>
>> Yesterday's e-mail caused some concerns, therefore we improved the patch
>> to re-write all in-tree projects to use the
>> doInitialization/run/doFinalization scheme for module passes just like it
>> is done for function passes.
>>
>> Right now no passes follow this model but the skeleton should make it
>> clear how the model operates and how to adapt module passes to follow the
>> model, the idea is that a pass would do basic immutable allocation and
>> variable set up in the constructor, would do minimal variable set up on the
>> doInitialization and doFinalization would free all the extra memory
>> allocated to store the state of the prior module, bringing the module pass
>> to the state right after construction so it can be reused for a future
>> module.
>>
>> Hope this is clear now,
>>
>> Thanks
>>
>> Pedro
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121114/a46406ee/attachment.html>


More information about the llvm-commits mailing list