[LLVMdev] Adding option to LLVM opt to disable a specific pass from command line

Roel Jordans r.jordans at tue.nl
Thu Dec 8 02:36:22 PST 2011


Hello,

>     - Some passes are required by another passes. In such cases
>     PassManager will insist on running them, which may conflict with the
>     user request from command line. Who wins?
>
>
> How to I know that a pass  is required by another ?
> Let's say give priority to pass manager and issue a warning like like
> 'option -disable-pass=<pass_name> ignored because required by pass
> <other_pass>.'
>

I would opt for disabling dependent passes as well, and providing a 
warning that they have been disabled implicitly (possibly giving the 
disabled pass that caused this effect).

I think such behavior would make sense if you were disabling passes 
because they contain bugs.

Another option would be to differentiate between a strong (disabling 
pass + dependents) and weak (disabling pass if no dependents) disable 
parameter.

- Roel



More information about the llvm-dev mailing list