[clang][bytecode] Implement __builtin_reduce_mul (#118287)
[llvm-project.git] / flang / test / Driver / mlir-debug-pass-pipeline.f90
blobab5ddedf5fc180df7d001009a86949151da7ee04
1 ! Test the debug pass pipeline
3 ! RUN: %flang -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline -o /dev/null %s 2>&1 | FileCheck --check-prefixes=ALL,NO-DEBUG %s
5 ! RUN: %flang -g0 -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -o /dev/null 2>&1 | FileCheck --check-prefixes=ALL,NO-DEBUG %s
6 ! RUN: %flang -g -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -o /dev/null 2>&1 | FileCheck --check-prefixes=ALL,DEBUG %s
7 ! RUN: %flang -g1 -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -o /dev/null 2>&1 | FileCheck --check-prefixes=ALL,DEBUG %s
8 ! RUN: %flang -gline-tables-only -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -o /dev/null 2>&1 | FileCheck --check-prefixes=ALL,DEBUG %s
9 ! RUN: %flang -gline-directives-only -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -o /dev/null 2>&1 | FileCheck --check-prefixes=ALL,DEBUG,DEBUG-DIRECTIVES %s
10 ! RUN: %flang -g2 -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -o /dev/null 2>&1 | FileCheck --check-prefixes=ALL,DEBUG,DEBUG-CONSTRUCT %s
11 ! RUN: %flang -g3 -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -o /dev/null 2>&1 | FileCheck --check-prefixes=ALL,DEBUG,DEBUG-CONSTRUCT %s
13 ! RUN: not %flang_fc1 -debug-info-kind=invalid -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -o /dev/null 2>&1 | FileCheck --check-prefixes=DEBUG-ERR %s
15 ! REQUIRES: asserts
17 end program
19 ! DEBUG-CONSTRUCT: warning: Unsupported debug option: constructor
20 ! DEBUG-DIRECTIVES: warning: Unsupported debug option: line-directives-only
22 ! DEBUG-ERR: error: invalid value 'invalid' in '-debug-info-kind=invalid'
23 ! DEBUG-ERR-NOT: Pass statistics report
25 ! ALL: Pass statistics report
26 ! ALL: Fortran::lower::VerifierPass
28 ! ALL: Pass statistics report
30 ! ALL: Fortran::lower::VerifierPass
31 ! ALL-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']
32 ! ALL-NEXT: 'fir.global' Pipeline
33 ! ALL-NEXT: InlineElementals
34 ! ALL-NEXT: 'func.func' Pipeline
35 ! ALL-NEXT: InlineElementals
36 ! ALL-NEXT: 'omp.declare_reduction' Pipeline
37 ! ALL-NEXT: InlineElementals
38 ! ALL-NEXT: 'omp.private' Pipeline
39 ! ALL-NEXT: InlineElementals
40 ! ALL-NEXT: LowerHLFIROrderedAssignments
41 ! ALL-NEXT: LowerHLFIRIntrinsics
42 ! ALL-NEXT: BufferizeHLFIR
43 ! ALL-NEXT: ConvertHLFIRtoFIR
44 ! ALL-NEXT: CSE
45 ! Ideally, we need an output with only the pass names, but
46 ! there is currently no way to get that, so in order to
47 ! guarantee that the passes are in the expected order
48 ! (i.e. use -NEXT) we have to check the statistics output as well.
49 ! ALL-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
50 ! ALL-NEXT: (S) 0 num-dce'd - Number of operations DCE'd
52 ! ALL-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']
53 ! ALL-NEXT: 'fir.global' Pipeline
54 ! ALL-NEXT: CharacterConversion
55 ! ALL-NEXT: 'func.func' Pipeline
56 ! ALL-NEXT: ArrayValueCopy
57 ! ALL-NEXT: CharacterConversion
58 ! ALL-NEXT: 'omp.declare_reduction' Pipeline
59 ! ALL-NEXT: CharacterConversion
60 ! ALL-NEXT: 'omp.private' Pipeline
61 ! ALL-NEXT: CharacterConversion
63 ! ALL-NEXT: Canonicalizer
64 ! ALL-NEXT: SimplifyRegionLite
65 ! ALL-NEXT: CSE
66 ! ALL-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
67 ! ALL-NEXT: (S) 0 num-dce'd - Number of operations DCE'd
69 ! ALL-NEXT: 'func.func' Pipeline
70 ! ALL-NEXT: MemoryAllocationOpt
72 ! ALL-NEXT: Inliner
73 ! ALL-NEXT: SimplifyRegionLite
74 ! ALL-NEXT: CSE
75 ! ALL-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
76 ! ALL-NEXT: (S) 0 num-dce'd - Number of operations DCE'd
78 ! ALL-NEXT: PolymorphicOpConversion
79 ! ALL-NEXT: AssumedRankOpConversion
81 ! ALL-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']
82 ! ALL-NEXT: 'fir.global' Pipeline
83 ! ALL-NEXT: StackReclaim
84 ! ALL-NEXT: CFGConversion
85 ! ALL-NEXT: 'func.func' Pipeline
86 ! ALL-NEXT: StackReclaim
87 ! ALL-NEXT: CFGConversion
88 ! ALL-NEXT: 'omp.declare_reduction' Pipeline
89 ! ALL-NEXT: StackReclaim
90 ! ALL-NEXT: CFGConversion
91 ! ALL-NEXT: 'omp.private' Pipeline
92 ! ALL-NEXT: StackReclaim
93 ! ALL-NEXT: CFGConversion
94 ! ALL-NEXT: SCFToControlFlow
95 ! ALL-NEXT: Canonicalizer
96 ! ALL-NEXT: SimplifyRegionLite
97 ! ALL-NEXT: CSE
98 ! ALL-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
99 ! ALL-NEXT: (S) 0 num-dce'd - Number of operations DCE'd
100 ! ALL-NEXT: BoxedProcedurePass
102 ! ALL-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']
103 ! ALL-NEXT: 'fir.global' Pipeline
104 ! ALL-NEXT: AbstractResultOpt
105 ! ALL-NEXT: 'func.func' Pipeline
106 ! ALL-NEXT: AbstractResultOpt
107 ! ALL-NEXT: 'omp.declare_reduction' Pipeline
108 ! ALL-NEXT: AbstractResultOpt
109 ! ALL-NEXT: 'omp.private' Pipeline
110 ! ALL-NEXT: AbstractResultOpt
112 ! ALL-NEXT: CodeGenRewrite
113 ! ALL-NEXT: (S) 0 num-dce'd - Number of operations eliminated
114 ! ALL-NEXT: ExternalNameConversion
115 ! DEBUG-NEXT: AddDebugInfo
116 ! NO-DEBUG-NOT: AddDebugInfo
117 ! ALL-NEXT: TargetRewrite
118 ! ALL-NEXT: CompilerGeneratedNamesConversion
119 ! ALL: FIRToLLVMLowering
120 ! ALL-NOT: LLVMIRLoweringPass