[all-commits] [llvm/llvm-project] 893e35: [test] Avoid legacy PM default pipelines (O0, O1 et...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Wed Nov 9 00:58:26 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 893e351f2f624e24b0743d58d87f30629b4054d4
      https://github.com/llvm/llvm-project/commit/893e351f2f624e24b0743d58d87f30629b4054d4
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2022-11-09 (Wed, 09 Nov 2022)

  Changed paths:
    M llvm/test/Transforms/AtomicExpand/AArch64/expand-atomicrmw-xchg-fp.ll
    M llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-expanded.ll

  Log Message:
  -----------
  [test] Avoid legacy PM default pipelines (O0,O1 etc) when running opt

Two lit tests were found running something like this:
  opt -O<n> -pass-locked-to-legacy-PM ...

The expand-atomicrmw-xchg-fp.ll seem to have used -O1 just to ensure
that the -atomic-expand pass were thinking that it wasn't running at
O0 level. Same thing can be ensured by using the -codegen-opt-level=1
option, making it possible to avoid using O1 in that test case.

In the vector-reductions-expanded.ll test case it was possible to
split the RUN line into using two opt invocations. First running
"opt -O2" using the new PM, and then running "opt -expand-reductions"
using the legacy PM.

I think that given this patch we get closer to removing code related
to 'AddOptimizationPasses' in opt.cpp.

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




More information about the All-commits mailing list