|
| 1 | +; ModuleID = '/home/ana-marija/Documents/foo.c' |
| 2 | +source_filename = "/home/ana-marija/Documents/foo.c" |
| 3 | +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" |
| 4 | +target triple = "x86_64-unknown-linux-gnu" |
| 5 | + |
| 6 | +; Function Attrs: noinline nounwind optnone uwtable |
| 7 | +define dso_local i32 @foo() #0 !dbg !10 { |
| 8 | + %1 = alloca i32, align 4 |
| 9 | + %2 = alloca i32, align 4 |
| 10 | + %3 = alloca i32, align 4 |
| 11 | + #dbg_declare(ptr %1, !16, !DIExpression(), !17) |
| 12 | + store i32 21, ptr %1, align 4, !dbg !17 |
| 13 | + #dbg_declare(ptr %2, !18, !DIExpression(), !19) |
| 14 | + store i32 22, ptr %2, align 4, !dbg !19 |
| 15 | + #dbg_declare(ptr %3, !20, !DIExpression(), !22) |
| 16 | + store i32 23, ptr %3, align 4, !dbg !22 |
| 17 | + %4 = load i32, ptr %1, align 4, !dbg !23 |
| 18 | + store i32 %4, ptr %3, align 4, !dbg !24 |
| 19 | + %5 = load i32, ptr %2, align 4, !dbg !25 |
| 20 | + store i32 %5, ptr %1, align 4, !dbg !26 |
| 21 | + %6 = load i32, ptr %1, align 4, !dbg !27 |
| 22 | + %7 = load i32, ptr %2, align 4, !dbg !28 |
| 23 | + %8 = add nsw i32 %6, %7, !dbg !29 |
| 24 | + ret i32 %8, !dbg !30 |
| 25 | +} |
| 26 | + |
| 27 | +; Function Attrs: noinline nounwind optnone uwtable |
| 28 | +define dso_local i32 @main() #0 !dbg !31 { |
| 29 | + %1 = alloca i32, align 4 |
| 30 | + %2 = alloca i32, align 4 |
| 31 | + store i32 0, ptr %1, align 4 |
| 32 | + #dbg_declare(ptr %2, !32, !DIExpression(), !33) |
| 33 | + %3 = call i32 @foo(), !dbg !34 |
| 34 | + store i32 %3, ptr %2, align 4, !dbg !33 |
| 35 | + %4 = load i32, ptr %2, align 4, !dbg !35 |
| 36 | + ret i32 %4, !dbg !36 |
| 37 | +} |
| 38 | + |
| 39 | +attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } |
| 40 | + |
| 41 | +!llvm.dbg.cu = !{!0} |
| 42 | +!llvm.module.flags = !{!2, !3, !4, !5, !6, !7, !8} |
| 43 | +!llvm.ident = !{!9} |
| 44 | + |
| 45 | +!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 22.0.0git (https://github.com/anamaoh/llvm-project.git 782a91e1fc94d9c82495f60afc5ed5edd72de776)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) |
| 46 | +!1 = !DIFile(filename: "/home/ana-marija/Documents/foo.c", directory: "/home/ana-marija/Desktop/LLVM/llvm-project", checksumkind: CSK_MD5, checksum: "22bc4641d6e8e63df371a758d86cafff") |
| 47 | +!2 = !{i32 7, !"Dwarf Version", i32 5} |
| 48 | +!3 = !{i32 2, !"Debug Info Version", i32 3} |
| 49 | +!4 = !{i32 1, !"wchar_size", i32 4} |
| 50 | +!5 = !{i32 8, !"PIC Level", i32 2} |
| 51 | +!6 = !{i32 7, !"PIE Level", i32 2} |
| 52 | +!7 = !{i32 7, !"uwtable", i32 2} |
| 53 | +!8 = !{i32 7, !"frame-pointer", i32 2} |
| 54 | +!9 = !{!"clang version 22.0.0git (https://github.com/anamaoh/llvm-project.git 782a91e1fc94d9c82495f60afc5ed5edd72de776)"} |
| 55 | +!10 = distinct !DISubprogram(name: "foo", scope: !11, file: !11, line: 1, type: !12, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) |
| 56 | +!11 = !DIFile(filename: "Documents/foo.c", directory: "/home/ana-marija", checksumkind: CSK_MD5, checksum: "22bc4641d6e8e63df371a758d86cafff") |
| 57 | +!12 = !DISubroutineType(types: !13) |
| 58 | +!13 = !{!14} |
| 59 | +!14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |
| 60 | +!15 = !{} |
| 61 | +!16 = !DILocalVariable(name: "X", scope: !10, file: !11, line: 2, type: !14) |
| 62 | +!17 = !DILocation(line: 2, column: 6, scope: !10) |
| 63 | +!18 = !DILocalVariable(name: "Y", scope: !10, file: !11, line: 3, type: !14) |
| 64 | +!19 = !DILocation(line: 3, column: 6, scope: !10) |
| 65 | +!20 = !DILocalVariable(name: "Z", scope: !21, file: !11, line: 5, type: !14) |
| 66 | +!21 = distinct !DILexicalBlock(scope: !10, file: !11, line: 4, column: 2) |
| 67 | +!22 = !DILocation(line: 5, column: 8, scope: !21) |
| 68 | +!23 = !DILocation(line: 6, column: 8, scope: !21) |
| 69 | +!24 = !DILocation(line: 6, column: 6, scope: !21) |
| 70 | +!25 = !DILocation(line: 8, column: 6, scope: !10) |
| 71 | +!26 = !DILocation(line: 8, column: 4, scope: !10) |
| 72 | +!27 = !DILocation(line: 9, column: 9, scope: !10) |
| 73 | +!28 = !DILocation(line: 9, column: 13, scope: !10) |
| 74 | +!29 = !DILocation(line: 9, column: 11, scope: !10) |
| 75 | +!30 = !DILocation(line: 9, column: 2, scope: !10) |
| 76 | +!31 = distinct !DISubprogram(name: "main", scope: !11, file: !11, line: 12, type: !12, scopeLine: 12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) |
| 77 | +!32 = !DILocalVariable(name: "A", scope: !31, file: !11, line: 13, type: !14) |
| 78 | +!33 = !DILocation(line: 13, column: 6, scope: !31) |
| 79 | +!34 = !DILocation(line: 13, column: 10, scope: !31) |
| 80 | +!35 = !DILocation(line: 14, column: 9, scope: !31) |
| 81 | +!36 = !DILocation(line: 14, column: 2, scope: !31) |
0 commit comments