[LV] Add test showing debug output for loops with uncountable BTCs.
[llvm-project.git] / clang / test / CodeGen / lto-newpm-pipeline.c
blobea9784a76f92330e4f0a6b3aad6be0257afdfab3
1 // REQUIRES: x86-registered-target
3 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=full -O0 %s 2>&1 | FileCheck %s \
4 // RUN: -check-prefix=CHECK-FULL-O0
5 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=thin -O0 %s 2>&1 | FileCheck %s \
6 // RUN: -check-prefix=CHECK-THIN-O0
7 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=full -O1 %s 2>&1 | FileCheck %s \
8 // RUN: -check-prefix=CHECK-FULL-OPTIMIZED
9 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=thin -O1 %s 2>&1 | FileCheck %s \
10 // RUN: -check-prefix=CHECK-THIN-OPTIMIZED
11 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=full -O2 %s 2>&1 | FileCheck %s \
12 // RUN: -check-prefix=CHECK-FULL-OPTIMIZED
13 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=thin -O2 %s 2>&1 | FileCheck %s \
14 // RUN: -check-prefix=CHECK-THIN-OPTIMIZED
15 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=full -O3 %s 2>&1 | FileCheck %s \
16 // RUN: -check-prefix=CHECK-FULL-OPTIMIZED
17 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=thin -O3 %s 2>&1 | FileCheck %s \
18 // RUN: -check-prefix=CHECK-THIN-OPTIMIZED
19 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=full -Os %s 2>&1 | FileCheck %s \
20 // RUN: -check-prefix=CHECK-FULL-OPTIMIZED
21 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=thin -Os %s 2>&1 | FileCheck %s \
22 // RUN: -check-prefix=CHECK-THIN-OPTIMIZED
23 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=full -Oz %s 2>&1 | FileCheck %s \
24 // RUN: -check-prefix=CHECK-FULL-OPTIMIZED
25 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -o /dev/null -mllvm -verify-analysis-invalidation=0 -fdebug-pass-manager -flto=thin -Oz %s 2>&1 | FileCheck %s \
26 // RUN: -check-prefix=CHECK-THIN-OPTIMIZED
28 // CHECK-FULL-O0: Running pass: VerifierPass
29 // CHECK-FULL-O0-NEXT: Running analysis: VerifierAnalysis
30 // CHECK-FULL-O0-NEXT: Running analysis: InnerAnalysisManagerProxy
31 // CHECK-FULL-O0-NEXT: Running pass: EntryExitInstrumenterPass
32 // CHECK-FULL-O0-NEXT: Running pass: AlwaysInlinerPass
33 // CHECK-FULL-O0-NEXT: Running analysis: ProfileSummaryAnalysis
34 // CHECK-FULL-O0-NEXT: Running pass: CoroConditionalWrapper
35 // CHECK-FULL-O0-NEXT: Running pass: CanonicalizeAliasesPass
36 // CHECK-FULL-O0-NEXT: Running pass: NameAnonGlobalPass
37 // CHECK-FULL-O0-NEXT: Running pass: AnnotationRemarksPass
38 // CHECK-FULL-O0-NEXT: Running analysis: TargetLibraryAnalysis
39 // CHECK-FULL-O0-NEXT: Running pass: VerifierPass
40 // CHECK-FULL-O0-NEXT: Running pass: BitcodeWriterPass
42 // CHECK-THIN-O0: Running pass: VerifierPass
43 // CHECK-THIN-O0-NEXT: Running analysis: VerifierAnalysis
44 // CHECK-THIN-O0-NEXT: Running analysis: InnerAnalysisManagerProxy
45 // CHECK-THIN-O0-NEXT: Running pass: EntryExitInstrumenterPass
46 // CHECK-THIN-O0-NEXT: Running pass: AlwaysInlinerPass
47 // CHECK-THIN-O0-NEXT: Running analysis: ProfileSummaryAnalysis
48 // CHECK-THIN-O0-NEXT: Running pass: CoroConditionalWrapper
49 // CHECK-THIN-O0-NEXT: Running pass: CanonicalizeAliasesPass
50 // CHECK-THIN-O0-NEXT: Running pass: NameAnonGlobalPass
51 // CHECK-THIN-O0-NEXT: Running pass: AnnotationRemarksPass
52 // CHECK-THIN-O0-NEXT: Running analysis: TargetLibraryAnalysis
53 // CHECK-THIN-O0-NEXT: Running pass: VerifierPass
54 // CHECK-THIN-O0-NEXT: Running pass: ThinLTOBitcodeWriterPass
56 // TODO: The LTO pre-link pipeline currently invokes
57 // buildPerModuleDefaultPipeline(), which contains LoopVectorizePass.
58 // This may change as the pipeline gets implemented.
59 // CHECK-FULL-OPTIMIZED: Running pass: LoopVectorizePass
60 // CHECK-FULL-OPTIMIZED: Running pass: BitcodeWriterPass
62 // The ThinLTO pre-link pipeline shouldn't contain passes like
63 // LoopVectorizePass.
64 // CHECK-THIN-OPTIMIZED-NOT: Running pass: LoopVectorizePass
65 // CHECK-THIN-OPTIMIZED: Running pass: CanonicalizeAliasesPass
66 // CHECK-THIN-OPTIMIZED: Running pass: NameAnonGlobalPass
67 // CHECK-THIN-OPTIMIZED: Running pass: ThinLTOBitcodeWriterPass
69 void Foo(void) {}