[LLVMdev] PassManagerBuilder vs. TargetPassConfig

Yaron Keren yaron.keren at gmail.com
Tue Sep 9 07:14:57 PDT 2014


Hi,

clang uses PassManagerBuilder via EmitAssemblyHelper::CreatePasses() to
create a collection of passes.

llvm (MCJIT) uses TargetPassConfig via addPassesToGenerateCode for the same
purpose.

There seems to some duplication and many differences
between PassManagerBuilder and TargetPassConfig, some aren't clear at all.

Two small examples:

1) PassManagerBuilder adds createScalarReplAggregatesPass
but TargetPassConfig does not.

2)  TargetPassConfig adds createLoopStrengthReducePass right after the
initial analysis but TargetPassConfig  does not.

I would expect that the optimization passes would be identical based on
optimization level only but they are quite different
between PassManagerBuilder and TargetPassConfig.

Yaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140909/f5d33f8c/attachment.html>


More information about the llvm-dev mailing list