[LLVMdev] Adding option to LLVM opt to disable a specific pass from command line
dpatel at apple.com
Wed Dec 7 09:51:40 PST 2011
On Dec 7, 2011, at 2:07 AM, Seb wrote:
> Hi all,
> I would like to add an option for LLVM 'opt' to disable a specific optimization pass from command line.
> The idea is to have something like:
> opt -O2 -disable-pass=[passname,...]
> Do you think it could be useful ?
I have few questions :
- Why (and when) would you us this ?
- Some of the passes are executed multiple times, how would you select which invocation to disable ? Or would you disable all invocation of such passes ?
- 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?
- Why not update the list passes run as part of -O2 (use --debug-pass=Arguments to get it) to remove selected passes and run opt <my list of passes> ... ?
> How should I proceed to develop it and commit changes to LLVM trunk ?
> Thanks for your advices and recommandations.
> Best Regards
More information about the llvm-dev