[llvm-dev] Reg: Executing ModulePass before O2/O3 optimizations

Sai Venkata Krishnan V via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 16 09:09:05 PDT 2021


Thanks Min-Yih. But currently I am using the legacy PassManager. Is there
any alternative way to achieve this?

On Wed, Sep 15, 2021 at 10:12 PM Min-Yih Hsu <minyihh at uci.edu> wrote:

> If you're using the new PassManager you can register your Pass
> with PassBuilder::registerPipelineStartEPCallback.
>
> -Min
>
> On Wed, Sep 15, 2021 at 8:16 AM Sai Venkata Krishnan V via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> Hello Everyone
>>     I have created a custom ModulePass which works fine when no
>> optimization flag is enabled i.e. on -O0 level. I am trying to order the
>> passes such that I run my ModulePass first and then the O2/O3
>> optimizations. Currently I am doing it in multiple steps, where at each
>> step I getting the transformed IR and providing as input. Is it possible to
>> specify this order in when invoking via clang itself.
>> Kindly guide me in this.
>>
>> Thanking you
>> Sai
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>
>
> --
> Min-Yih Hsu
> Ph.D Student in ICS Department, University of California, Irvine (UCI).
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210916/6c8ee313/attachment-0001.html>


More information about the llvm-dev mailing list