brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.0 KiB · 82b39d4 Raw
128 lines · plain
1; RUN: llc -o %t.obj %s -filetype=obj2; RUN: llvm-pdbutil dump -symbols -types %t.obj | FileCheck %s3;4; The IR in this test derives from the following Fortran program5; with inlining enabled:6; program if_test7;   implicit none8;   integer, allocatable :: a9;   allocate(a)10;   call sub(a)11; contains12;   subroutine sub(aa)13;     implicit none14;     integer :: aa, bb15;     bb = 116;     aa = bb17;   end subroutine sub18; end program if_test19;20; CHECK: [[proc_t:.*]] | LF_PROCEDURE21;22; CHECK: [[func_id_sub:.*]] | LF_FUNC_ID23; CHECK-NEXT: name = SUB, type = [[proc_t]], parent scope = <no type>24;25; CHECK: [[func_id_if_test:.*]] | LF_FUNC_ID26; CHECK-NEXT: name = IF_TEST, type = [[proc_t]], parent scope = <no type>27;28; CHECK: S_GPROC32_ID [size = {{.*}}] `IF_TEST`29; CHECK-NEXT: parent30; CHECK-NEXT: type = `[[func_id_if_test]] (IF_TEST)`31;32; ModuleID = 'tr1.f90'33source_filename = "tr1.f90"34target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"35target triple = "x86_64-pc-windows-msvc"36 37@"IF_TEST$A" = internal global ptr null, align 8, !dbg !038@0 = internal unnamed_addr constant i32 6553639@1 = internal unnamed_addr constant i32 240 41; Function Attrs: nounwind uwtable42define void @MAIN__() local_unnamed_addr #0 !dbg !2 {43alloca_0:44  %func_result = tail call i32 @for_set_fpe_(ptr nonnull @0) #4, !dbg !2245  %func_result2 = tail call i32 @for_set_reentrancy(ptr nonnull @1) #4, !dbg !2246  %func_result4 = tail call i32 @for_alloc_allocatable(i64 4, ptr @"IF_TEST$A", i32 262144) #4, !dbg !2347  %"IF_TEST$A_fetch.1" = load ptr, ptr @"IF_TEST$A", align 8, !dbg !24, !tbaa !2548  call void @llvm.dbg.declare(metadata ptr %"IF_TEST$A_fetch.1", metadata !29, metadata !DIExpression()), !dbg !3349  call void @llvm.dbg.value(metadata i32 1, metadata !32, metadata !DIExpression()), !dbg !3550  store i32 1, ptr %"IF_TEST$A_fetch.1", align 1, !dbg !36, !tbaa !37, !alias.scope !4151  ret void, !dbg !4452}53 54; Function Attrs: mustprogress nofree norecurse nosync nounwind uwtable willreturn writeonly55define void @IF_TEST_ip_SUB(ptr noalias nocapture dereferenceable(4) %AA) local_unnamed_addr #1 !dbg !30 {56alloca_1:57  call void @llvm.dbg.declare(metadata ptr %AA, metadata !29, metadata !DIExpression()), !dbg !4558  call void @llvm.dbg.value(metadata i32 1, metadata !32, metadata !DIExpression()), !dbg !4659  store i32 1, ptr %AA, align 1, !dbg !47, !tbaa !3760  ret void, !dbg !4861}62 63declare i32 @for_set_fpe_(ptr nocapture readonly) local_unnamed_addr64 65; Function Attrs: nofree66declare i32 @for_set_reentrancy(ptr nocapture readonly) local_unnamed_addr #267 68; Function Attrs: nofree69declare i32 @for_alloc_allocatable(i64, ptr nocapture, i32) local_unnamed_addr #270 71; Function Attrs: mustprogress nofree nosync nounwind readnone speculatable willreturn72declare void @llvm.dbg.declare(metadata, metadata, metadata) #373 74; Function Attrs: mustprogress nofree nosync nounwind readnone speculatable willreturn75declare void @llvm.dbg.value(metadata, metadata, metadata) #376 77attributes #0 = { nounwind uwtable "denormal-fp-math"="preserve-sign,preserve-sign" "frame-pointer"="none" "intel-lang"="fortran" "min-legal-vector-width"="0" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" }78attributes #1 = { mustprogress nofree norecurse nosync nounwind uwtable willreturn writeonly "denormal-fp-math"="preserve-sign,preserve-sign" "frame-pointer"="none" "intel-lang"="fortran" "min-legal-vector-width"="0" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" }79attributes #2 = { nofree "intel-lang"="fortran" }80attributes #3 = { mustprogress nofree nosync nounwind readnone speculatable willreturn }81attributes #4 = { nounwind }82 83!llvm.module.flags = !{!11, !12, !13}84!llvm.dbg.cu = !{!6}85!omp_offload.info = !{}86 87!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())88!1 = distinct !DIGlobalVariable(name: "A", linkageName: "IF_TEST$A", scope: !2, file: !3, line: 11, type: !9, isLocal: true, isDefinition: true)89!2 = distinct !DISubprogram(name: "IF_TEST", linkageName: "MAIN__", scope: !3, file: !3, line: 9, type: !4, scopeLine: 9, spFlags: DISPFlagDefinition | DISPFlagMainSubprogram, unit: !6, retainedNodes: !8)90!3 = !DIFile(filename: "tr1.f90", directory: "d:\\iusers\\cchen15\\examples\\tests\\jr14335")91!4 = !DISubroutineType(types: !5)92!5 = !{null}93!6 = distinct !DICompileUnit(language: DW_LANG_Fortran95, file: !3, producer: "Intel(R) Fortran 22.0-1087", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !7, splitDebugInlining: false, nameTableKind: None)94!7 = !{!0}95!8 = !{}96!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64)97!10 = !DIBasicType(name: "INTEGER*4", size: 32, encoding: DW_ATE_signed)98!11 = !{i32 7, !"PIC Level", i32 2}99!12 = !{i32 2, !"Debug Info Version", i32 3}100!13 = !{i32 2, !"CodeView", i32 1}101!22 = !DILocation(line: 9, scope: !2)102!23 = !DILocation(line: 12, scope: !2)103!24 = !DILocation(line: 14, scope: !2)104!25 = !{!26, !26, i64 0}105!26 = !{!"ifx$unique_sym$1", !27, i64 0}106!27 = !{!"Generic Fortran Symbol", !28, i64 0}107!28 = !{!"ifx$root$1$MAIN__"}108!29 = !DILocalVariable(name: "AA", arg: 1, scope: !30, file: !3, line: 17, type: !10)109!30 = distinct !DISubprogram(name: "SUB", linkageName: "IF_TEST_ip_SUB", scope: !2, file: !3, line: 17, type: !4, scopeLine: 17, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !31)110!31 = !{!29, !32}111!32 = !DILocalVariable(name: "BB", scope: !30, file: !3, line: 19, type: !10)112!33 = !DILocation(line: 17, scope: !30, inlinedAt: !34)113!34 = distinct !DILocation(line: 14, scope: !2)114!35 = !DILocation(line: 0, scope: !30, inlinedAt: !34)115!36 = !DILocation(line: 21, scope: !30, inlinedAt: !34)116!37 = !{!38, !38, i64 0}117!38 = !{!"ifx$unique_sym$3", !39, i64 0}118!39 = !{!"Generic Fortran Symbol", !40, i64 0}119!40 = !{!"ifx$root$2$IF_TEST_ip_SUB"}120!41 = !{!42}121!42 = distinct !{!42, !43, !"IF_TEST_ip_SUB: %AA"}122!43 = distinct !{!43, !"IF_TEST_ip_SUB"}123!44 = !DILocation(line: 16, scope: !2)124!45 = !DILocation(line: 17, scope: !30)125!46 = !DILocation(line: 0, scope: !30)126!47 = !DILocation(line: 21, scope: !30)127!48 = !DILocation(line: 22, scope: !30)128