[all-commits] [llvm/llvm-project] d4e08c: [NewPM] Set -enable-npm-optnone to true by default

aeubanks via All-commits all-commits at lists.llvm.org
Mon Oct 5 18:42:53 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d4e08c95e500bc813b24b146be29f17e7c08fa2a
      https://github.com/llvm/llvm-project/commit/d4e08c95e500bc813b24b146be29f17e7c08fa2a
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2020-10-05 (Mon, 05 Oct 2020)

  Changed paths:
    M llvm/lib/Passes/StandardInstrumentations.cpp

  Log Message:
  -----------
  [NewPM] Set -enable-npm-optnone to true by default

This makes the NPM skip not required passes on functions marked optnone.

If this causes a pass that should be required but has not been marked
required to be skipped, add
`static bool isRequired() { return true; }`
to the pass class. AlwaysInlinerPass is an example.

clang/test/CodeGen/O0-no-skipped-passes.c is useful for checking that
no passes are skipped under -O0.

The -enable-npm-optnone option will be removed once this has been stable
for long enough without issues.

Reviewed By: ychen, asbirlea

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




More information about the All-commits mailing list