brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.3 KiB · 0d68191 Raw
174 lines · plain
1! Test the MLIR pass pipeline2 3! RUN: %flang_fc1 -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline -o /dev/null %s 2>&1 | FileCheck --check-prefixes=ALL %s4! -O0 is the default:5! RUN: %flang_fc1 -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -O0 -o /dev/null 2>&1 | FileCheck --check-prefixes=ALL %s6! RUN: %flang_fc1 -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -O2 -o /dev/null 2>&1 | FileCheck --check-prefixes=ALL,O2 %s7 8! REQUIRES: asserts9 10end program11 12! ALL: Pass statistics report13! ALL: Fortran::lower::VerifierPass14 15! ALL: Pass statistics report16 17! ALL: Fortran::lower::VerifierPass18! O2-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']19! O2-NEXT: 'fir.global' Pipeline20! O2-NEXT:   ExpressionSimplification21! O2-NEXT: 'func.func' Pipeline22! O2-NEXT:   ExpressionSimplification23! O2-NEXT: 'omp.declare_reduction' Pipeline24! O2-NEXT:   ExpressionSimplification25! O2-NEXT: 'omp.private' Pipeline26! O2-NEXT:   ExpressionSimplification27! O2-NEXT: Canonicalizer28! ALL:     Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']29! ALL-NEXT:'fir.global' Pipeline30! O2-NEXT:   SimplifyHLFIRIntrinsics31! ALL:       InlineElementals32! ALL-NEXT:'func.func' Pipeline33! O2-NEXT:   SimplifyHLFIRIntrinsics34! ALL:       InlineElementals35! ALL-NEXT:'omp.declare_reduction' Pipeline36! O2-NEXT:   SimplifyHLFIRIntrinsics37! ALL:       InlineElementals38! ALL-NEXT:'omp.private' Pipeline39! O2-NEXT:   SimplifyHLFIRIntrinsics40! ALL:       InlineElementals41! O2-NEXT: Canonicalizer42! O2-NEXT: CSE43! O2-NEXT: (S) {{.*}} num-cse'd44! O2-NEXT: (S) {{.*}} num-dce'd45! O2-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']46! O2-NEXT: 'fir.global' Pipeline47! O2-NEXT:   SimplifyHLFIRIntrinsics48! O2-NEXT:   PropagateFortranVariableAttributes49! O2-NEXT:   OptimizedBufferization50! O2-NEXT:   InlineHLFIRAssign51! O2-NEXT: 'func.func' Pipeline52! O2-NEXT:   SimplifyHLFIRIntrinsics53! O2-NEXT:   PropagateFortranVariableAttributes54! O2-NEXT:   OptimizedBufferization55! O2-NEXT:   InlineHLFIRAssign56! O2-NEXT: 'omp.declare_reduction' Pipeline57! O2-NEXT:   SimplifyHLFIRIntrinsics58! O2-NEXT:   PropagateFortranVariableAttributes59! O2-NEXT:   OptimizedBufferization60! O2-NEXT:   InlineHLFIRAssign61! O2-NEXT: 'omp.private' Pipeline62! O2-NEXT:   SimplifyHLFIRIntrinsics63! O2-NEXT:   PropagateFortranVariableAttributes64! O2-NEXT:   OptimizedBufferization65! O2-NEXT:   InlineHLFIRAssign66! ALL: LowerHLFIROrderedAssignments67! ALL-NEXT: LowerHLFIRIntrinsics68! ALL-NEXT: BufferizeHLFIR69! O2-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']70! O2-NEXT:   'fir.global' Pipeline71! O2-NEXT:     InlineHLFIRAssign72! O2-NEXT:   'func.func' Pipeline73! O2-NEXT:     InlineHLFIRAssign74! O2-NEXT:   'omp.declare_reduction' Pipeline75! O2-NEXT:     InlineHLFIRAssign76! O2-NEXT:   'omp.private' Pipeline77! O2-NEXT:     InlineHLFIRAssign78! ALL-NEXT: ConvertHLFIRtoFIR79! ALL-NEXT: CSE80! Ideally, we need an output with only the pass names, but81! there is currently no way to get that, so in order to82! guarantee that the passes are in the expected order83! (i.e. use -NEXT) we have to check the statistics output as well.84! ALL-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd85! ALL-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd86 87! ALL-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']88! ALL-NEXT: 'fir.global' Pipeline89! ALL-NEXT:   CharacterConversion90! ALL-NEXT: 'func.func' Pipeline91! ALL-NEXT:   ArrayValueCopy92! ALL-NEXT:   CharacterConversion93! ALL-NEXT: 'omp.declare_reduction' Pipeline94! ALL-NEXT:   CharacterConversion95! ALL-NEXT: 'omp.private' Pipeline96! ALL-NEXT:   CharacterConversion97 98! ALL-NEXT: Canonicalizer99! ALL-NEXT: SimplifyRegionLite100!  O2-NEXT: SimplifyIntrinsics101!  O2-NEXT: AlgebraicSimplification102! ALL-NEXT: CSE103! ALL-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd104! ALL-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd105 106! ALL-NEXT: 'func.func' Pipeline107! ALL-NEXT:   MemoryAllocationOpt108 109! ALL-NEXT: Inliner110! ALL-NEXT: SimplifyRegionLite111! ALL-NEXT: CSE112! ALL-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd113! ALL-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd114 115! ALL-NEXT: PolymorphicOpConversion116! ALL-NEXT: AssumedRankOpConversion117! O2-NEXT:  'func.func' Pipeline118! O2-NEXT:    OptimizeArrayRepacking119! ALL-NEXT: LowerRepackArraysPass120! ALL-NEXT: SimplifyFIROperations121 122! ALL-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']123! ALL-NEXT:    'fir.global' Pipeline124! ALL-NEXT:      StackReclaim125! ALL-NEXT:      CFGConversion126! ALL-NEXT:    'func.func' Pipeline127! ALL-NEXT:      StackReclaim128! ALL-NEXT:      CFGConversion129! ALL-NEXT:   'omp.declare_reduction' Pipeline130! ALL-NEXT:      StackReclaim131! ALL-NEXT:      CFGConversion132! ALL-NEXT:   'omp.private' Pipeline133! ALL-NEXT:      StackReclaim134! ALL-NEXT:      CFGConversion135 136! ALL-NEXT: SCFToControlFlow137! ALL-NEXT: Canonicalizer138! ALL-NEXT: SimplifyRegionLite139! ALL-NEXT: ConvertComplexPow140! ALL-NEXT: CSE141! ALL-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd142! ALL-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd143! O2-NEXT:  'func.func' Pipeline144! O2-NEXT:    SetRuntimeCallAttributes145! ALL-NEXT: MIFOpConversion146! ALL-NEXT: BoxedProcedurePass147! O2-NEXT:  AddAliasTags148 149! ALL-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'gpu.module', 'omp.declare_reduction', 'omp.private']150! ALL-NEXT:   'fir.global' Pipeline151! ALL-NEXT:    AbstractResultOpt152! ALL-NEXT:  'func.func' Pipeline153! ALL-NEXT:    AbstractResultOpt154! ALL-NEXT:  'gpu.module' Pipeline155! ALL-NEXT:   Pipeline Collection : ['func.func', 'gpu.func']156! ALL-NEXT:   'func.func' Pipeline157! ALL-NEXT:   AbstractResultOpt158! ALL-NEXT:   'gpu.func' Pipeline159! ALL-NEXT:   AbstractResultOpt160! ALL-NEXT:  'omp.declare_reduction' Pipeline161! ALL-NEXT:    AbstractResultOpt162! ALL-NEXT:  'omp.private' Pipeline163! ALL-NEXT:    AbstractResultOpt164 165! ALL-NEXT: CodeGenRewrite166! ALL-NEXT:   (S) 0 num-dce'd - Number of operations eliminated167! ALL-NEXT: ExternalNameConversion168! ALL-NEXT: TargetRewrite169! ALL-NEXT: CompilerGeneratedNamesConversion170! ALL-NEXT:  'func.func' Pipeline171! ALL-NEXT:   FunctionAttr172! ALL-NEXT: FIRToLLVMLowering173! ALL-NOT: LLVMIRLoweringPass174