[LLVMdev] Pass sequence

John Criswell criswell at illinois.edu
Sun Oct 6 09:37:19 PDT 2013


On 10/5/13 11:17 PM, Niko Zarzani wrote:
>
> Hi all,
>
>
> I wrote 2 passes and I want to make run llvm run the passes in this order:
>
>  -mem2reg -load=.../mypass1.dylib -mypass1 -load=.../mypass2.dylib 
> -mypass2 -O1 -O2 -O3
>
>
> I know I can do this by manually passing them as an argument to opt.
>
>
> Is there any way to force this sequence directly from clang?
>

To the best of my knowledge, no, there is no mechanism in LLVM that does 
this for two optimization passes.  You can do it, however, if mypass1 is 
an analysis pass that does not modify the bitcode and mypass2 is either 
an analysis pass or an optimization pass.  The LLVM PassManager should 
run all required prerequisite analysis passes before an optimization 
pass that requires them in getAnalysisUsage().

-- John T.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131006/734985f6/attachment.html>


More information about the llvm-dev mailing list