[all-commits] [llvm/llvm-project] 606e75: [NewPM] make parsePassPipeline parse adaptor-wrapp...

Yuanfang Chen via All-commits all-commits at lists.llvm.org
Sat Jul 18 22:57:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 606e756bb10a52318bece68a8b844e06ce71641d
      https://github.com/llvm/llvm-project/commit/606e756bb10a52318bece68a8b844e06ce71641d
  Author: Yuanfang Chen <yuanfang.chen at sony.com>
  Date:   2020-07-18 (Sat, 18 Jul 2020)

  Changed paths:
    M llvm/include/llvm/Passes/PassBuilder.h
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/test/Other/pass-pipeline-parsing.ll

  Log Message:
  -----------
  [NewPM] make parsePassPipeline parse adaptor-wrapped user passes

Currently, when parsing text pipeline, different kinds of passes always
introduce nested pass managers. This makes it impossible to test the
adaptor-wrapped user passes from the text pipeline interface which is needed
by D82344 test cases. This also seems useful in general. See comments above
`parsePassPipeline`.

The syntax would be like mixing passes of different types, but it is
not the same as inferring the correct pass type and then adding the
matching nested pass managers. Strictly speaking, the resulted pipelines
are different.

Reviewed By: asbirlea, aeubanks

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


  Commit: af4c8730924fb6617494c223dac62d6c72c97c6f
      https://github.com/llvm/llvm-project/commit/af4c8730924fb6617494c223dac62d6c72c97c6f
  Author: Yuanfang Chen <yuanfang.chen at sony.com>
  Date:   2020-07-18 (Sat, 18 Jul 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/CGSCCPassManager.h
    M llvm/include/llvm/IR/PassInstrumentation.h
    M llvm/include/llvm/IR/PassManager.h
    M llvm/include/llvm/IR/PassManagerInternal.h
    M llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
    M llvm/unittests/IR/PassBuilderCallbacksTest.cpp

  Log Message:
  -----------
  [NewPM] Allow passes to never be skipped

A pass declares itself unskippable by defining a method `static bool isRequired()`.

Also, this patch makes pass managers and adaptor passes required (unskippable).

PassInstrumentation before-pass-callbacks could be used to skip passes by returning false.
However, some passes should not be skipped at all. Especially so for special-purpose passes such as pass managers and adaptor passes since if they are skipped for any reason, the passes contained by them would also be skipped ignoring contained passes's return value of `isRequired()`.

Reviewed By: aeubanks

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


Compare: https://github.com/llvm/llvm-project/compare/b2b39c5d455b...af4c8730924f


More information about the All-commits mailing list