• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -openmpopt -pass-remarks=openmp-opt -disable-output < %s 2>&1 | FileCheck %s
2; RUN: opt -passes=openmpopt -pass-remarks=openmp-opt -disable-output < %s 2>&1 | FileCheck %s
3; ModuleID = 'deduplication_remarks.c'
4source_filename = "deduplication_remarks.c"
5target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6target triple = "x86_64-pc-linux-gnu"
7
8%struct.ident_t = type { i32, i32, i32, i32, i8* }
9
10@0 = private unnamed_addr global %struct.ident_t { i32 0, i32 34, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str0, i32 0, i32 0) }, align 8
11@.str0 = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00", align 1
12
13; CHECK: remark: deduplication_remarks.c:9:10: OpenMP runtime call __kmpc_global_thread_num moved to deduplication_remarks.c:5:10
14; CHECK: remark: deduplication_remarks.c:7:10: OpenMP runtime call __kmpc_global_thread_num deduplicated
15; CHECK: remark: deduplication_remarks.c:5:10: OpenMP runtime call __kmpc_global_thread_num deduplicated
16define dso_local void @deduplicate() local_unnamed_addr !dbg !14 {
17  %1 = tail call i32 @__kmpc_global_thread_num(%struct.ident_t* nonnull @0), !dbg !21
18  call void @useI32(i32 %1), !dbg !23
19  %2 = tail call i32 @__kmpc_global_thread_num(%struct.ident_t* nonnull @0), !dbg !24
20  call void @useI32(i32 %2), !dbg !25
21  %3 = tail call i32 @__kmpc_global_thread_num(%struct.ident_t* nonnull @0), !dbg !26
22  call void @useI32(i32 %3), !dbg !27
23  ret void, !dbg !28
24}
25
26declare i32 @__kmpc_global_thread_num(%struct.ident_t*)
27
28declare !dbg !4 void @useI32(i32) local_unnamed_addr
29
30declare void @llvm.dbg.value(metadata, metadata, metadata)
31
32!llvm.dbg.cu = !{!0}
33!llvm.module.flags = !{!8, !9, !10, !11, !12}
34!llvm.ident = !{!13}
35
36!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, splitDebugInlining: false, nameTableKind: None)
37!1 = !DIFile(filename: "deduplication_remarks.c", directory: "/tmp")
38!2 = !{}
39!3 = !{!4}
40!4 = !DISubprogram(name: "useI32", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)
41!5 = !DISubroutineType(types: !6)
42!6 = !{null, !7}
43!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
44!8 = !{i32 7, !"Dwarf Version", i32 4}
45!9 = !{i32 2, !"Debug Info Version", i32 3}
46!10 = !{i32 1, !"wchar_size", i32 4}
47!11 = !{i32 7, !"PIC Level", i32 2}
48!12 = !{i32 7, !"PIE Level", i32 2}
49!13 = !{!"clang version 10.0.0 "}
50!14 = distinct !DISubprogram(name: "deduplicate", scope: !1, file: !1, line: 4, type: !15, scopeLine: 4, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !17)
51!15 = !DISubroutineType(types: !16)
52!16 = !{null}
53!17 = !{!18, !19, !20}
54!18 = !DILocalVariable(name: "x", scope: !14, file: !1, line: 5, type: !7)
55!19 = !DILocalVariable(name: "y", scope: !14, file: !1, line: 7, type: !7)
56!20 = !DILocalVariable(name: "z", scope: !14, file: !1, line: 9, type: !7)
57!21 = !DILocation(line: 5, column: 10, scope: !14)
58!22 = !DILocation(line: 0, scope: !14)
59!23 = !DILocation(line: 6, column: 2, scope: !14)
60!24 = !DILocation(line: 7, column: 10, scope: !14)
61!25 = !DILocation(line: 8, column: 2, scope: !14)
62!26 = !DILocation(line: 9, column: 10, scope: !14)
63!27 = !DILocation(line: 10, column: 2, scope: !14)
64!28 = !DILocation(line: 13, column: 1, scope: !14)
65