Files
clang-p2996/clang/test/Driver/debug-pass-structure.c
Arthur Eubanks 0c509dbc7e [NewPM] Add options to PrintPassInstrumentation
To bring D99599's implementation in line with the existing
PrintPassInstrumentation, and to fix a FIXME, add more customizability
to PrintPassInstrumentation.

Introduce three new options. The first takes over the existing
"-debug-pass-manager-verbose" cl::opt.

The second and third option are specific to -fdebug-pass-structure. They
allow indentation, and also don't print analysis queries.

To avoid more golden file tests than necessary, prune down the
-fdebug-pass-structure tests.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D102196
2021-05-18 20:59:35 -07:00

16 lines
720 B
C

// Test that we print pass structure with new and legacy PM.
// RUN: %clang -fexperimental-new-pass-manager -fdebug-pass-structure -fintegrated-as -O3 -S -emit-llvm %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=NEWPM --strict-whitespace
// RUN: %clang -flegacy-pass-manager -fdebug-pass-structure -O0 -S -emit-llvm %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=LEGACYPM
// REQUIRES: asserts
// should have proper indentation, should not print any analysis information
// NEWPM-NOT: Running analysis
// NEWPM: {{^}}Running{{.*}}GlobalOptPass
// NEWPM: {{^}} Running{{.*}}RequireAnalysisPass{{.*}}GlobalsAA
// NEWPM: GlobalOptPass
// NEWPM-NOT: Invalidating analysis
// LEGACYPM: Pass Arguments:
void f() {}