1 // RUN: tco %s | FileCheck %s
2 // RUN: tco %s --mlir-pass-statistics --mlir-pass-statistics-display=pipeline 2>&1 | FileCheck %s --check-prefix=PASSES
6 // Check that tco is working with a basic test.
7 // Also check the passes in the default pipeline.
13 // CHECK: ; ModuleID = 'FIRModule'
14 // CHECK-LABEL: define void @_QQmain()
17 // PASSES: Pass statistics report
20 // PASSES-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
21 // PASSES-NEXT: (S) 0 num-dce'd - Number of operations DCE'd
23 // PASSES-NEXT: 'func.func' Pipeline
24 // PASSES-NEXT: ArrayValueCopy
25 // PASSES-NEXT: CharacterConversion
27 // PASSES-NEXT: Canonicalizer
28 // PASSES-NEXT: SimplifyRegionLite
29 // PASSES-NEXT: SimplifyIntrinsics
30 // PASSES-NEXT: AlgebraicSimplification
32 // PASSES-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
33 // PASSES-NEXT: (S) 0 num-dce'd - Number of operations DCE'd
35 // PASSES-NEXT: 'func.func' Pipeline
36 // PASSES-NEXT: MemoryAllocationOpt
38 // PASSES-NEXT: Inliner
39 // PASSES-NEXT: SimplifyRegionLite
41 // PASSES-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
42 // PASSES-NEXT: (S) 0 num-dce'd - Number of operations DCE'd
44 // PASSES-NEXT: 'func.func' Pipeline
45 // PASSES-NEXT: PolymorphicOpConversion
46 // PASSES-NEXT: CFGConversion
48 // PASSES-NEXT: SCFToControlFlow
49 // PASSES-NEXT: Canonicalizer
50 // PASSES-NEXT: SimplifyRegionLite
52 // PASSES-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
53 // PASSES-NEXT: (S) 0 num-dce'd - Number of operations DCE'd
54 // PASSES-NEXT: BoxedProcedurePass
56 // PASSES-NEXT: Pipeline Collection : ['fir.global', 'func.func']
57 // PASSES-NEXT: 'fir.global' Pipeline
58 // PASSES-NEXT: AbstractResultOnGlobalOpt
59 // PASSES-NEXT: 'func.func' Pipeline
60 // PASSES-NEXT: AbstractResultOnFuncOpt
62 // PASSES-NEXT: CodeGenRewrite
63 // PASSES-NEXT: (S) 0 num-dce'd - Number of operations eliminated
64 // PASSES-NEXT: TargetRewrite
65 // PASSES-NEXT: FIRToLLVMLowering
66 // PASSES-NEXT: LLVMIRLoweringPass