[llvm-commits] [llvm] r168008 - in /llvm/trunk: include/llvm/Pass.h include/llvm/PassManager.h include/llvm/PassManagers.h lib/Analysis/IPA/CallGraphSCCPass.cpp lib/VMCore/PassManager.cpp tools/bugpoint/CrashDebugger.cpp tools/llc/llc.cpp tools/llvm-extract/llvm-extract.cpp tools/llvm-prof/llvm-prof.cpp tools/llvm-stress/llvm-stress.cpp tools/lto/LTOCodeGenerator.cpp tools/opt/opt.cpp

Chris Lattner clattner at apple.com
Wed Nov 14 16:56:04 PST 2012


On Nov 14, 2012, at 4:14 PM, Owen Anderson <resistor at mac.com> wrote:

> Author: resistor
> Date: Wed Nov 14 18:14:15 2012
> New Revision: 168008
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=168008&view=rev
> Log:
> Add doInitialization and doFinalization methods to ModulePass's, to allow them to be re-initialized and reused on multiple Module's.

Cool.  Is it feasible to have "run" call these implicitly?  This sort of patch:

>   // Now that we have all of the passes ready, run them.
> +  Passes.doInitialization();
>   Passes.run(*M.get());
> +  Passes.doFinalization();
> 
>   // Declare success.
>   if (!NoOutput || PrintBreakpoints)

Makes me sad.

-Chris



More information about the llvm-commits mailing list