[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / Other / new-pm-thinlto-postlink-pgo-defaults.ll
blob3abd32349ddd10277927bb5eb77b7776d231d508
1 ; Validate ThinLTO post link pipeline when we have instrumentation PGO
3 ; Postlink pipelines:
4 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
5 ; RUN:     -passes='thinlto<O1>' -S %s 2>&1 \
6 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,%llvmcheckext
7 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
8 ; RUN:     -passes='thinlto<O2>' -S  %s 2>&1 \
9 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,%llvmcheckext
10 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager -passes-ep-pipeline-start='no-op-module' \
11 ; RUN:     -passes='thinlto<O3>' -S  %s 2>&1 \
12 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,%llvmcheckext
13 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
14 ; RUN:     -passes='thinlto<Os>' -S %s 2>&1 \
15 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-O23SZ,%llvmcheckext
16 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager \
17 ; RUN:     -passes='thinlto<Oz>' -S %s 2>&1 \
18 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-Oz,CHECK-O23SZ,%llvmcheckext
19 ; RUN: opt -disable-verify -verify-cfg-preserved=0 -debug-pass-manager -new-pm-debug-info-for-profiling \
20 ; RUN:     -passes='thinlto<O2>' -S  %s 2>&1 \
21 ; RUN:     | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,%llvmcheckext
23 ; Suppress FileCheck --allow-unused-prefixes=false diagnostics.
24 ; CHECK-NOEXT: {{^}}
26 ; CHECK-O: Running pass: Annotation2Metadata
27 ; CHECK-O-NEXT: Running pass: ForceFunctionAttrsPass
28 ; CHECK-EP-PIPELINE-START-NEXT: Running pass: NoOpModulePass
29 ; CHECK-O-NEXT: Running pass: PGOIndirectCallPromotion
30 ; CHECK-O-NEXT: Running analysis: ProfileSummaryAnalysis
31 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
32 ; CHECK-O-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis
33 ; CHECK-O-NEXT: Running pass: InferFunctionAttrsPass
34 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
35 ; CHECK-O-NEXT: Running pass: LowerExpectIntrinsicPass
36 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
37 ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis
38 ; CHECK-O-NEXT: Running analysis: AssumptionAnalysis
39 ; CHECK-O-NEXT: Running pass: SROA
40 ; CHECK-O-NEXT: Running analysis: DominatorTreeAnalysis
41 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
42 ; CHECK-O-NEXT: Running analysis: TargetLibraryAnalysis
43 ; CHECK-O-NEXT: Running pass: CoroEarlyPass
44 ; CHECK-O3-NEXT: Running pass: CallSiteSplittingPass
45 ; CHECK-O-NEXT: Running pass: OpenMPOptPass
46 ; CHECK-O-NEXT: Running pass: LowerTypeTestsPass
47 ; CHECK-O-NEXT: Running pass: IPSCCPPass
48 ; CHECK-O-NEXT: Running pass: CalledValuePropagationPass
49 ; CHECK-O-NEXT: Running pass: GlobalOptPass
50 ; CHECK-O-NEXT: Running pass: PromotePass
51 ; CHECK-O-NEXT: Running pass: DeadArgumentEliminationPass
52 ; CHECK-O-NEXT: Running pass: InstCombinePass
53 ; CHECK-O-NEXT: Running analysis: AAManager
54 ; CHECK-O-NEXT: Running analysis: BasicAA
55 ; CHECK-O-NEXT: Running analysis: ScopedNoAliasAA
56 ; CHECK-O-NEXT: Running analysis: TypeBasedAA
57 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy
58 ; CHECK-O-NEXT: Running analysis: BlockFrequencyAnalysis on foo
59 ; These next two can appear in any order since they are accessed as parameters
60 ; on the same call to BlockFrequencyInfo::calculate.
61 ; CHECK-O-DAG: Running analysis: LoopAnalysis on foo
62 ; CHECK-O-DAG: Running analysis: BranchProbabilityAnalysis on foo
63 ; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis on foo
64 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
65 ; CHECK-O-NEXT: Running pass: ModuleInlinerWrapperPass
66 ; CHECK-O-NEXT: Running analysis: InlineAdvisorAnalysis
67 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
68 ; CHECK-O-NEXT: Running analysis: GlobalsAA
69 ; CHECK-O-NEXT: Running analysis: CallGraphAnalysis
70 ; CHECK-O-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}AAManager
71 ; CHECK-O-NEXT: Invalidating analysis: AAManager
72 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}ProfileSummaryAnalysis
73 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
74 ; CHECK-O-NEXT: Running analysis: LazyCallGraphAnalysis
75 ; CHECK-O-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy
76 ; CHECK-O-NEXT: Running analysis: OuterAnalysisManagerProxy<{{.*}}LazyCallGraph::SCC{{.*}}>
77 ; CHECK-O-NEXT: Running pass: DevirtSCCRepeatedPass
78 ; CHECK-O-NEXT: Running pass: InlinerPass
79 ; CHECK-O-NEXT: Running pass: InlinerPass
80 ; CHECK-O-NEXT: Running pass: PostOrderFunctionAttrsPass
81 ; CHECK-O-NEXT: Running analysis: AAManager
82 ; CHECK-O3-NEXT: Running pass: ArgumentPromotionPass
83 ; CHECK-O2-NEXT: Running pass: OpenMPOptCGSCCPass
84 ; CHECK-O3-NEXT: Running pass: OpenMPOptCGSCCPass
85 ; CHECK-O-NEXT: Running pass: SROA
86 ; CHECK-O-NEXT: Running pass: EarlyCSEPass
87 ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
88 ; CHECK-O23SZ-NEXT: Running pass: SpeculativeExecutionPass
89 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
90 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
91 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
92 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
93 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
94 ; CHECK-O3-NEXT: Running pass: AggressiveInstCombinePass
95 ; CHECK-O-NEXT: Running pass: InstCombinePass
96 ; CHECK-O1-NEXT: Running pass: LibCallsShrinkWrapPass
97 ; CHECK-O2-NEXT: Running pass: LibCallsShrinkWrapPass
98 ; CHECK-O3-NEXT: Running pass: LibCallsShrinkWrapPass
99 ; CHECK-O23SZ-NEXT: Running pass: TailCallElimPass
100 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
101 ; CHECK-O-NEXT: Running pass: ReassociatePass
102 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis
103 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
104 ; CHECK-O-NEXT: Running pass: LCSSAPass
105 ; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
106 ; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
107 ; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
108 ; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass
109 ; CHECK-O-NEXT: Running pass: LICM
110 ; CHECK-O-NEXT: Running pass: LoopRotatePass
111 ; CHECK-O-NEXT: Running pass: LICM
112 ; CHECK-O-NEXT: Running pass: SimpleLoopUnswitchPass
113 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
114 ; CHECK-O-NEXT: Running pass: InstCombinePass
115 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
116 ; CHECK-O-NEXT: Running pass: LCSSAPass
117 ; CHECK-O-NEXT: Running pass: LoopIdiomRecognizePass
118 ; CHECK-O-NEXT: Running pass: IndVarSimplifyPass
119 ; CHECK-O-NEXT: Running pass: LoopDeletionPass
120 ; CHECK-O-NEXT: Running pass: LoopFullUnrollPass
121 ; CHECK-O-NEXT: Running pass: SROA on foo
122 ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass
123 ; CHECK-Os-NEXT: Running pass: GVN
124 ; CHECK-Os-NEXT: Running analysis: MemoryDependenceAnalysis
125 ; CHECK-Os-NEXT: Running analysis: PhiValuesAnalysis
126 ; CHECK-Oz-NEXT: Running pass: MergedLoadStoreMotionPass
127 ; CHECK-Oz-NEXT: Running pass: GVN
128 ; CHECK-Oz-NEXT: Running analysis: MemoryDependenceAnalysis
129 ; CHECK-Oz-NEXT: Running analysis: PhiValuesAnalysis
130 ; CHECK-O2-NEXT: Running pass: MergedLoadStoreMotionPass
131 ; CHECK-O2-NEXT: Running pass: GVN
132 ; CHECK-O2-NEXT: Running analysis: MemoryDependenceAnalysis
133 ; CHECK-O2-NEXT: Running analysis: PhiValuesAnalysis
134 ; CHECK-O3-NEXT: Running pass: MergedLoadStoreMotionPass
135 ; CHECK-O3-NEXT: Running pass: GVN
136 ; CHECK-O3-NEXT: Running analysis: MemoryDependenceAnalysis
137 ; CHECK-O3-NEXT: Running analysis: PhiValuesAnalysis
138 ; CHECK-O1-NEXT: Running pass: MemCpyOptPass
139 ; CHECK-O-NEXT: Running pass: SCCPPass
140 ; CHECK-O-NEXT: Running pass: BDCEPass
141 ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
142 ; CHECK-O-NEXT: Running pass: InstCombinePass
143 ; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
144 ; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
145 ; CHECK-O23SZ-NEXT: Running pass: CorrelatedValuePropagationPass
146 ; CHECK-O23SZ-NEXT: Invalidating analysis: LazyValueAnalysis
147 ; CHECK-O1-NEXT: Running pass: CoroElidePass
148 ; CHECK-O-NEXT: Running pass: ADCEPass
149 ; CHECK-O23SZ-NEXT: Running pass: MemCpyOptPass
150 ; CHECK-O23SZ-NEXT: Running pass: DSEPass
151 ; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass
152 ; CHECK-O23SZ-NEXT: Running pass: LCSSAPass
153 ; CHECK-O23SZ-NEXT: Running pass: LICMPass
154 ; CHECK-O23SZ-NEXT: Running pass: CoroElidePass
155 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
156 ; CHECK-O-NEXT: Running pass: InstCombinePass
157 ; CHECK-O-NEXT: Running pass: CoroSplitPass
158 ; CHECK-O-NEXT: Running pass: GlobalOptPass
159 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
160 ; CHECK-O-NEXT: Running pass: EliminateAvailableExternallyPass
161 ; CHECK-O-NEXT: Running pass: ReversePostOrderFunctionAttrsPass
162 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}GlobalsAA
163 ; CHECK-O-NEXT: Running pass: Float2IntPass
164 ; CHECK-O-NEXT: Running pass: LowerConstantIntrinsicsPass
165 ; CHECK-EXT: Running pass: {{.*}}::Bye
166 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass on foo
167 ; CHECK-O-NEXT: Running pass: LCSSAPass on foo
168 ; CHECK-O-NEXT: Running pass: LoopRotatePass
169 ; CHECK-O-NEXT: Running pass: LoopDistributePass
170 ; CHECK-O-NEXT: Running pass: InjectTLIMappings
171 ; CHECK-O-NEXT: Running pass: LoopVectorizePass
172 ; CHECK-O-NEXT: Running pass: LoopLoadEliminationPass
173 ; CHECK-O-NEXT: Running analysis: LoopAccessAnalysis
174 ; CHECK-O-NEXT: Running pass: InstCombinePass
175 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
176 ; CHECK-O2-NEXT: Running pass: SLPVectorizerPass
177 ; CHECK-O3-NEXT: Running pass: SLPVectorizerPass
178 ; CHECK-Os-NEXT: Running pass: SLPVectorizerPass
179 ; CHECK-O-NEXT: Running pass: VectorCombinePass
180 ; CHECK-O-NEXT: Running pass: InstCombinePass
181 ; CHECK-O-NEXT: Running pass: LoopUnrollPass
182 ; CHECK-O-NEXT: Running pass: WarnMissedTransformationsPass
183 ; CHECK-O-NEXT: Running pass: InstCombinePass
184 ; CHECK-O-NEXT: Running pass: RequireAnalysisPass<{{.*}}OptimizationRemarkEmitterAnalysis
185 ; CHECK-O-NEXT: Running pass: LoopSimplifyPass
186 ; CHECK-O-NEXT: Running pass: LCSSAPass
187 ; CHECK-O-NEXT: Running pass: LICMPass
188 ; CHECK-O-NEXT: Running pass: AlignmentFromAssumptionsPass
189 ; CHECK-O-NEXT: Running pass: LoopSinkPass
190 ; CHECK-O-NEXT: Running pass: InstSimplifyPass
191 ; CHECK-O-NEXT: Running pass: DivRemPairsPass
192 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass
193 ; CHECK-O-NEXT: Running pass: CoroCleanupPass
194 ; CHECK-O-NEXT: Running pass: CGProfilePass
195 ; CHECK-O-NEXT: Running pass: GlobalDCEPass
196 ; CHECK-O-NEXT: Running pass: ConstantMergePass
197 ; CHECK-O-NEXT: Running pass: RelLookupTableConverterPass
198 ; CHECK-O-NEXT: Running analysis: TargetIRAnalysis
199 ; CHECK-O-NEXT: Running pass: AnnotationRemarksPass on foo
200 ; CHECK-O-NEXT: Running pass: PrintModulePass
202 ; Make sure we get the IR back out without changes when we print the module.
203 ; CHECK-O-LABEL: define void @foo(i32 %n) local_unnamed_addr {
204 ; CHECK-O-NEXT: entry:
205 ; CHECK-O-NEXT:   br label %loop
206 ; CHECK-O:      loop:
207 ; CHECK-O-NEXT:   %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
208 ; CHECK-O-NEXT:   %iv.next = add i32 %iv, 1
209 ; CHECK-O-NEXT:   tail call void @bar()
210 ; CHECK-O-NEXT:   %cmp = icmp eq i32 %iv, %n
211 ; CHECK-O-NEXT:   br i1 %cmp, label %exit, label %loop
212 ; CHECK-O:      exit:
213 ; CHECK-O-NEXT:   ret void
214 ; CHECK-O-NEXT: }
216 ; Ignore a bunch of intervening metadata containing profile data.
219 declare void @bar() local_unnamed_addr
221 define void @foo(i32 %n) local_unnamed_addr {
222 entry:
223   br label %loop
224 loop:
225   %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
226   %iv.next = add i32 %iv, 1
227   tail call void @bar()
228   %cmp = icmp eq i32 %iv, %n
229   br i1 %cmp, label %exit, label %loop
230 exit:
231   ret void
234 !llvm.module.flags = !{!0}
236 !0 = !{i32 1, !"ProfileSummary", !1}
237 !1 = !{!2, !3, !4, !5, !6, !7, !8, !9}
238 !2 = !{!"ProfileFormat", !"InstrProf"}
239 !3 = !{!"TotalCount", i64 0}
240 !4 = !{!"MaxCount", i64 0}
241 !5 = !{!"MaxInternalCount", i64 0}
242 !6 = !{!"MaxFunctionCount", i64 0}
243 !7 = !{!"NumCounts", i64 0}
244 !8 = !{!"NumFunctions", i64 0}
245 !9 = !{!"DetailedSummary", !10}
246 !10 = !{!11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26}
247 !11 = !{i32 10000, i64 0, i32 0}
248 !12 = !{i32 100000, i64 0, i32 0}
249 !13 = !{i32 200000, i64 0, i32 0}
250 !14 = !{i32 300000, i64 0, i32 0}
251 !15 = !{i32 400000, i64 0, i32 0}
252 !16 = !{i32 500000, i64 0, i32 0}
253 !17 = !{i32 600000, i64 0, i32 0}
254 !18 = !{i32 700000, i64 0, i32 0}
255 !19 = !{i32 800000, i64 0, i32 0}
256 !20 = !{i32 900000, i64 0, i32 0}
257 !21 = !{i32 950000, i64 0, i32 0}
258 !22 = !{i32 990000, i64 0, i32 0}
259 !23 = !{i32 999000, i64 0, i32 0}
260 !24 = !{i32 999900, i64 0, i32 0}
261 !25 = !{i32 999990, i64 0, i32 0}
262 !26 = !{i32 999999, i64 0, i32 0}