[all-commits] [llvm/llvm-project] 7a5332: [opt] Remove support for using -O[0|1|2|3|s|z] wit...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Fri Nov 11 00:18:43 PST 2022


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

  Changed paths:
    M llvm/test/Other/opt-On.ll
    M llvm/tools/opt/opt.cpp

  Log Message:
  -----------
  [opt] Remove support for using -O[0|1|2|3|s|z] with legacy PM in opt

When running a default pipeline (for a specific O-level) in opt it is
now expected that the new PM should be used. Only reason to use the
legacy PM is when testing a pass that is locked to the legacy PM (or
when testing single passes, for example used by the llc backend).

If a test should run both a default pipeline plus some other passes,
the solution would be to invoke opt twice (separating the default
pipeline execution from the execution of individual passes).

Starting with this patch "opt -O0" etc. will result in an error.

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




More information about the All-commits mailing list