summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/pgo-sample.c
blob: f0e73ec076ef4bc8825027f119e8bbb430bdf464 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Test if PGO sample use passes are invoked.
//
// Ensure Pass PGOInstrumentationGenPass is invoked.
// RUN: %clang_cc1 -O2 -fno-experimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=LEGACY
// RUN: %clang_cc1 -O2 -fexperimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -fdebug-pass-manager -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=NEWPM

// LEGACY: Remove unused exception handling info
// LEGACY: Sample profile pass

// NEWPM: SimplifyCFGPass
// NEWPM: SampleProfileLoaderPass

int func(int a) { return a; }
OpenPOWER on IntegriCloud