How to disable few passes from O1 optimization

Hi All ,

I want to disable fe passes from O1 optimization . How can I implement in the source code . In which file I need to modify to skip few pass to invoke .

If there is any way from command line or source code . If anyone can help me

The pass pipeline is defined in this file: llvm-project/PassBuilderPipelines.cpp at main · llvm/llvm-project · GitHub

You should be able to adjust the passes that run by modifying this file.

If I comment out the few passes here then how could I understand whether they have any dependencies or not .

Also how will I test that commented passes are not running .

Thanks

On Wed, May 24, 2023, 2:12 PM Florian Hahn via LLVM Discussion Forums <notifications@llvm.discoursemail.com> wrote:

fhahn
May 24

The pass pipeline is defined in this file: llvm-project/PassBuilderPipelines.cpp at main · llvm/llvm-project · GitHub

You should be able to adjust the passes that run by modifying this file.


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

It depends on what kind of dependencies you’re asking here. LLVM’s analyses are calculated on-demand so you don’t have to worry about such dependency. If you’re asking dependencies on some canonicalization Passes (e.g. LoopSimplify), to my best understanding, I don’t think we express those kind of dependencies explicitly.

If you’re using opt (with new PassManager) then -debug-pass-manager will list all the Passes in the pipeline; for llc it’s -debug-pass=Structure.

Thanks for your response .

I will try that .

On Wed, May 24, 2023 at 4:06 PM Min-Yih Hsu via LLVM Discussion Forums <notifications@llvm.discoursemail.com> wrote:

mshockwave
May 24

soma_p:

If I comment out the few passes here then how could I understand whether they have any dependencies or not .

It depends on what kind of dependencies you’re asking here. LLVM’s analyses are calculated on-demand so you don’t have to worry about such dependency. If you’re asking dependencies on some canonicalization Passes (e.g. LoopSimplify), to my best understanding, I don’t think we express those kind of dependencies explicitly.

soma_p:

Also how will I test that commented passes are not running .

If you’re using opt (with new PassManager) then -debug-pass-manager will list all the Passes in the pipeline; for llc it’s -debug-pass=Structure.


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Hi ,

I figured out a file in which some passes are disabled: llvm/lib/CodeGen/TargetPassConfig.cpp
Here few backend passes are disabled and enabled but I am getting the implementation logic. Can I add a few more passes here to disable .

If anyone can help me to understand .

Thanks

On Wed, May 24, 2023 at 4:54 PM soma pal <soma.pal1@gmail.com> wrote:

Thanks for your response .

I will try that .

On Wed, May 24, 2023 at 4:06 PM Min-Yih Hsu via LLVM Discussion Forums <notifications@llvm.discoursemail.com> wrote:

mshockwave
May 24

soma_p:

If I comment out the few passes here then how could I understand whether they have any dependencies or not .

It depends on what kind of dependencies you’re asking here. LLVM’s analyses are calculated on-demand so you don’t have to worry about such dependency. If you’re asking dependencies on some canonicalization Passes (e.g. LoopSimplify), to my best understanding, I don’t think we express those kind of dependencies explicitly.

soma_p:

Also how will I test that commented passes are not running .

If you’re using opt (with new PassManager) then -debug-pass-manager will list all the Passes in the pipeline; for llc it’s -debug-pass=Structure.


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Could you please help how could I run using Clang . As I am working on optimization , so I need to disable specific passes using clang not opt