[all-commits] [llvm/llvm-project] 304f2b: [NPM] Added opt option -print-pipeline-passes.

elavkje via All-commits all-commits at lists.llvm.org
Wed Sep 1 23:30:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 304f2bd21de67583669b9787034e0e9c6caef775
      https://github.com/llvm/llvm-project/commit/304f2bd21de67583669b9787034e0e9c6caef775
  Author: Markus Lavin <markus.lavin at ericsson.com>
  Date:   2021-09-02 (Thu, 02 Sep 2021)

  Changed paths:
    M llvm/include/llvm/IR/PassManager.h
    M llvm/include/llvm/IR/PassManagerInternal.h
    M llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
    M llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h
    M llvm/lib/IR/PassManager.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Transforms/Scalar/LoopPassManager.cpp
    M llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
    A llvm/test/Other/new-pm-print-pipeline.ll
    M llvm/tools/opt/NewPMDriver.cpp

  Log Message:
  -----------
  [NPM] Added opt option -print-pipeline-passes.

Added opt option -print-pipeline-passes to print a -passes compatible
string describing the built pass pipeline.

As an example:
$ opt -enable-new-pm=1 -adce -licm -simplifycfg -o /dev/null /dev/null -print-pipeline-passes
verify,function(adce),function(loop-mssa(licm)),function(simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts>),verify,BitcodeWriterPass

At the moment this is best-effort only and there are some known
limitations:
- Not all passes accepting parameters will print their parameters
  (currently only implemented for simplifycfg).
- Some ClassName to pass-name mappings are not unique.
- Some ClassName to pass-name mappings are missing (e.g.
  BitcodeWriterPass).

Differential Revision: https://reviews.llvm.org/D108298




More information about the All-commits mailing list