Skip to content

Commit d4e08c9

Browse files
committed
[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
1 parent 36bb1fb commit d4e08c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Passes/StandardInstrumentations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ using namespace llvm;
3333

3434
// TODO: remove once all required passes are marked as such.
3535
static cl::opt<bool>
36-
EnableOptnone("enable-npm-optnone", cl::init(false),
36+
EnableOptnone("enable-npm-optnone", cl::init(true),
3737
cl::desc("Enable skipping optional passes optnone functions "
3838
"under new pass manager"));
3939

0 commit comments

Comments
 (0)