File: hwloop-dbg.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (64 lines) | stat: -rw-r--r-- 3,223 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
; RUN: llc < %s -march=hexagon -disable-lsr | FileCheck %s

; CHECK:     loop0(
; CHECK-NOT: add({{r[0-9]*}}, #
; CHECK:     endloop0

target datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-v64:64:64-v32:32:32-a0:0-n16:32"
target triple = "hexagon"

define void @f0(i32* nocapture %a0, i32* nocapture %a1) #0 !dbg !4 {
b0:
  call void @llvm.dbg.value(metadata i32* %a0, metadata !10, metadata !DIExpression()), !dbg !14
  call void @llvm.dbg.value(metadata i32* %a1, metadata !11, metadata !DIExpression()), !dbg !15
  call void @llvm.dbg.value(metadata i32 0, metadata !12, metadata !DIExpression()), !dbg !16
  br label %b1, !dbg !16

b1:                                               ; preds = %b1, %b0
  %v0 = phi i32* [ %a0, %b0 ], [ %v7, %b1 ]
  %v1 = phi i32 [ 0, %b0 ], [ %v5, %b1 ]
  %v2 = phi i32* [ %a1, %b0 ], [ %v3, %b1 ]
  %v3 = getelementptr inbounds i32, i32* %v2, i32 1, !dbg !18
  call void @llvm.dbg.value(metadata i32* %v3, metadata !11, metadata !DIExpression()), !dbg !18
  %v4 = load i32, i32* %v2, align 4, !dbg !18
  store i32 %v4, i32* %v0, align 4, !dbg !18
  %v5 = add nsw i32 %v1, 1, !dbg !20
  call void @llvm.dbg.value(metadata i32 %v5, metadata !12, metadata !DIExpression()), !dbg !20
  %v6 = icmp eq i32 %v5, 10, !dbg !16
  %v7 = getelementptr i32, i32* %v0, i32 1
  br i1 %v6, label %b2, label %b1, !dbg !16

b2:                                               ; preds = %b1
  ret void, !dbg !21
}

declare void @llvm.dbg.value(metadata, metadata, metadata) #1

attributes #0 = { nounwind "target-cpu"="hexagonv5" }
attributes #1 = { nounwind readnone speculatable }

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3}

!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "QuIC LLVM Hexagon Clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2)
!1 = !DIFile(filename: "hwloop-dbg.c", directory: "/test")
!2 = !{}
!3 = !{i32 1, !"Debug Info Version", i32 3}
!4 = distinct !DISubprogram(name: "foo", scope: null, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !9)
!5 = !DISubroutineType(types: !6)
!6 = !{null, !7, !7}
!7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 32, align: 32)
!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!9 = !{!10, !11, !12}
!10 = !DILocalVariable(name: "a", arg: 1, scope: !4, file: !1, line: 1, type: !7)
!11 = !DILocalVariable(name: "b", arg: 2, scope: !4, file: !1, line: 1, type: !7)
!12 = !DILocalVariable(name: "i", scope: !13, file: !1, line: 2, type: !8)
!13 = distinct !DILexicalBlock(scope: !4, file: !1, line: 1, column: 26)
!14 = !DILocation(line: 1, column: 15, scope: !4)
!15 = !DILocation(line: 1, column: 23, scope: !4)
!16 = !DILocation(line: 3, column: 8, scope: !17)
!17 = distinct !DILexicalBlock(scope: !13, file: !1, line: 3, column: 3)
!18 = !DILocation(line: 4, column: 5, scope: !19)
!19 = distinct !DILexicalBlock(scope: !17, file: !1, line: 3, column: 28)
!20 = !DILocation(line: 3, column: 23, scope: !17)
!21 = !DILocation(line: 6, column: 1, scope: !13)