[llvm] r225554 - Fix the JIT event listeners and replace the associated tests.
Andrew Kaylor
andrew.kaylor at intel.com
Fri Jan 9 14:53:24 PST 2015
Author: akaylor
Date: Fri Jan 9 16:53:24 2015
New Revision: 225554
URL: http://llvm.org/viewvc/llvm-project?rev=225554&view=rev
Log:
Fix the JIT event listeners and replace the associated tests.
The changes to EventListenerCommon.h were contributed by Arch Robison.
This fixes bug 22095.
http://reviews.llvm.org/D6905
Added:
llvm/trunk/test/JitListener/multiple.ll
llvm/trunk/test/JitListener/simple.ll
Removed:
llvm/trunk/test/JitListener/test-common-symbols.ll
llvm/trunk/test/JitListener/test-inline.ll
llvm/trunk/test/JitListener/test-parameters.ll
Modified:
llvm/trunk/lib/ExecutionEngine/EventListenerCommon.h
llvm/trunk/test/JitListener/lit.local.cfg
Modified: llvm/trunk/lib/ExecutionEngine/EventListenerCommon.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/EventListenerCommon.h?rev=225554&r1=225553&r2=225554&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/EventListenerCommon.h (original)
+++ llvm/trunk/lib/ExecutionEngine/EventListenerCommon.h Fri Jan 9 16:53:24 2015
@@ -1,67 +1,68 @@
-//===-- JIT.h - Abstract Execution Engine Interface -------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// Common functionality for JITEventListener implementations
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef EVENT_LISTENER_COMMON_H
-#define EVENT_LISTENER_COMMON_H
-
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/IR/DebugInfo.h"
-#include "llvm/IR/Metadata.h"
-#include "llvm/IR/ValueHandle.h"
-#include "llvm/Support/Path.h"
-
-namespace llvm {
-
-namespace jitprofiling {
-
-class FilenameCache {
- // Holds the filename of each Scope, so that we can pass a null-terminated
- // string into oprofile. Use an AssertingVH rather than a ValueMap because we
- // shouldn't be modifying any MDNodes while this map is alive.
- DenseMap<AssertingVH<MDNode>, std::string> Filenames;
- DenseMap<AssertingVH<MDNode>, std::string> Paths;
-
- public:
- const char *getFilename(MDNode *Scope) {
- std::string &Filename = Filenames[Scope];
- if (Filename.empty()) {
- DIScope DIScope(Scope);
- Filename = DIScope.getFilename();
- }
- return Filename.c_str();
- }
-
- const char *getFullPath(MDNode *Scope) {
- std::string &P = Paths[Scope];
- if (P.empty()) {
- DIScope DIScope(Scope);
- StringRef DirName = DIScope.getDirectory();
- StringRef FileName = DIScope.getFilename();
- SmallString<256> FullPath;
- if (DirName != "." && DirName != "") {
- FullPath = DirName;
- }
- if (FileName != "") {
- sys::path::append(FullPath, FileName);
- }
- P = FullPath.str();
- }
- return P.c_str();
- }
-};
-
-} // namespace jitprofiling
-
-} // namespace llvm
-
-#endif //EVENT_LISTENER_COMMON_H
+//===-- JIT.h - Abstract Execution Engine Interface -------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// Common functionality for JITEventListener implementations
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef EVENT_LISTENER_COMMON_H
+#define EVENT_LISTENER_COMMON_H
+
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/IR/DebugInfo.h"
+#include "llvm/IR/Metadata.h"
+#include "llvm/IR/ValueHandle.h"
+#include "llvm/Support/Path.h"
+
+namespace llvm {
+
+namespace jitprofiling {
+
+class FilenameCache {
+ // Holds the filename of each Scope, so that we can pass a null-terminated
+ // string into oprofile.
+ DenseMap<const MDNode *, std::string> Filenames;
+ DenseMap<const MDNode *, std::string> Paths;
+
+ public:
+ const char *getFilename(MDNode *Scope) {
+ assert(Scope->isResolved() && "Expected Scope to be resolved");
+ std::string &Filename = Filenames[Scope];
+ if (Filename.empty()) {
+ DIScope DIScope(Scope);
+ Filename = DIScope.getFilename();
+ }
+ return Filename.c_str();
+ }
+
+ const char *getFullPath(MDNode *Scope) {
+ assert(Scope->isResolved() && "Expected Scope to be resolved");
+ std::string &P = Paths[Scope];
+ if (P.empty()) {
+ DIScope DIScope(Scope);
+ StringRef DirName = DIScope.getDirectory();
+ StringRef FileName = DIScope.getFilename();
+ SmallString<256> FullPath;
+ if (DirName != "." && DirName != "") {
+ FullPath = DirName;
+ }
+ if (FileName != "") {
+ sys::path::append(FullPath, FileName);
+ }
+ P = FullPath.str();
+ }
+ return P.c_str();
+ }
+};
+
+} // namespace jitprofiling
+
+} // namespace llvm
+
+#endif //EVENT_LISTENER_COMMON_H
Modified: llvm/trunk/test/JitListener/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/JitListener/lit.local.cfg?rev=225554&r1=225553&r2=225554&view=diff
==============================================================================
--- llvm/trunk/test/JitListener/lit.local.cfg (original)
+++ llvm/trunk/test/JitListener/lit.local.cfg Fri Jan 9 16:53:24 2015
@@ -1,3 +1,3 @@
-if not config.root.llvm_use_intel_jitevents == "ON":
+if not config.root.llvm_use_intel_jitevents == "true":
config.unsupported = True
Added: llvm/trunk/test/JitListener/multiple.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/JitListener/multiple.ll?rev=225554&view=auto
==============================================================================
--- llvm/trunk/test/JitListener/multiple.ll (added)
+++ llvm/trunk/test/JitListener/multiple.ll Fri Jan 9 16:53:24 2015
@@ -0,0 +1,167 @@
+; Verify the behavior of the IntelJITEventListener.
+; RUN: llvm-jitlistener %s | FileCheck %s
+
+; This test was created using the following file:
+;
+; 1: int foo(int a) {
+; 2: return a;
+; 3: }
+; 4:
+; 5: int bar(int a) {
+; 6: if (a == 0) {
+; 7: return 0;
+; 8: }
+; 9: return 100/a;
+; 10: }
+; 11:
+; 12: int fubar(int a) {
+; 13: switch (a) {
+; 14: case 0:
+; 15: return 10;
+; 16: case 1:
+; 17: return 20;
+; 18: default:
+; 19: return 30;
+; 20: }
+; 21: }
+;
+
+; CHECK: Method load [1]: bar, Size = {{[0-9]+}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[5,6,7,9]}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[5,6,7,9]}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[5,6,7,9]}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[5,6,7,9]}}
+
+; CHECK: Method load [2]: foo, Size = {{[0-9]+}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[1,2]}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[1,2]}}
+
+; CHECK: Method load [3]: fubar, Size = {{[0-9]+}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[12,13,15,17,19]}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[12,13,15,17,19]}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[12,13,15,17,19]}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[12,13,15,17,19]}}
+; CHECK: Line info @ {{[0-9]+}}: multiple.c, line {{[12,13,15,17,19]}}
+
+; CHECK: Method unload [1]
+; CHECK: Method unload [2]
+; CHECK: Method unload [3]
+
+; ModuleID = 'multiple.c'
+
+; Function Attrs: nounwind uwtable
+define i32 @foo(i32 %a) #0 {
+entry:
+ %a.addr = alloca i32, align 4
+ store i32 %a, i32* %a.addr, align 4
+ call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !15, metadata !16), !dbg !17
+ %0 = load i32* %a.addr, align 4, !dbg !18
+ ret i32 %0, !dbg !19
+}
+
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
+
+; Function Attrs: nounwind uwtable
+define i32 @bar(i32 %a) #0 {
+entry:
+ %retval = alloca i32, align 4
+ %a.addr = alloca i32, align 4
+ store i32 %a, i32* %a.addr, align 4
+ call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !20, metadata !16), !dbg !21
+ %0 = load i32* %a.addr, align 4, !dbg !22
+ %cmp = icmp eq i32 %0, 0, !dbg !22
+ br i1 %cmp, label %if.then, label %if.end, !dbg !24
+
+if.then: ; preds = %entry
+ store i32 0, i32* %retval, !dbg !25
+ br label %return, !dbg !25
+
+if.end: ; preds = %entry
+ %1 = load i32* %a.addr, align 4, !dbg !27
+ %div = sdiv i32 100, %1, !dbg !28
+ store i32 %div, i32* %retval, !dbg !29
+ br label %return, !dbg !29
+
+return: ; preds = %if.end, %if.then
+ %2 = load i32* %retval, !dbg !30
+ ret i32 %2, !dbg !30
+}
+
+; Function Attrs: nounwind uwtable
+define i32 @fubar(i32 %a) #0 {
+entry:
+ %retval = alloca i32, align 4
+ %a.addr = alloca i32, align 4
+ store i32 %a, i32* %a.addr, align 4
+ call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !31, metadata !16), !dbg !32
+ %0 = load i32* %a.addr, align 4, !dbg !33
+ switch i32 %0, label %sw.default [
+ i32 0, label %sw.bb
+ i32 1, label %sw.bb1
+ ], !dbg !34
+
+sw.bb: ; preds = %entry
+ store i32 10, i32* %retval, !dbg !35
+ br label %return, !dbg !35
+
+sw.bb1: ; preds = %entry
+ store i32 20, i32* %retval, !dbg !37
+ br label %return, !dbg !37
+
+sw.default: ; preds = %entry
+ store i32 30, i32* %retval, !dbg !38
+ br label %return, !dbg !38
+
+return: ; preds = %sw.default, %sw.bb1, %sw.bb
+ %1 = load i32* %retval, !dbg !39
+ ret i32 %1, !dbg !39
+}
+
+attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { nounwind readnone }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!11, !12, !13}
+!llvm.ident = !{!14}
+
+!0 = !{!"0x11\0012\00clang version 3.6.0 (trunk)\000\00\000\00\001", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [F:\users\akaylor\llvm-s\llvm\test\JitListener/multiple.c] [DW_LANG_C99]
+!1 = !{!"multiple.c", !"F:\5Cusers\5Cakaylor\5Cllvm-s\5Cllvm\5Ctest\5CJitListener"}
+!2 = !{}
+!3 = !{!4, !9, !10}
+!4 = !{!"0x2e\00foo\00foo\00\001\000\001\000\000\00256\000\001", !1, !5, !6, null, i32 (i32)* @foo, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo]
+!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [F:\users\akaylor\llvm-s\llvm\test\JitListener/multiple.c]
+!6 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!7 = !{!8, !8}
+!8 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
+!9 = !{!"0x2e\00bar\00bar\00\005\000\001\000\000\00256\000\005", !1, !5, !6, null, i32 (i32)* @bar, null, null, !2} ; [ DW_TAG_subprogram ] [line 5] [def] [bar]
+!10 = !{!"0x2e\00fubar\00fubar\00\0012\000\001\000\000\00256\000\0012", !1, !5, !6, null, i32 (i32)* @fubar, null, null, !2} ; [ DW_TAG_subprogram ] [line 12] [def] [fubar]
+!11 = !{i32 2, !"Dwarf Version", i32 4}
+!12 = !{i32 2, !"Debug Info Version", i32 2}
+!13 = !{i32 1, !"PIC Level", i32 2}
+!14 = !{!"clang version 3.6.0 (trunk)"}
+!15 = !{!"0x101\00a\0016777217\000", !4, !5, !8} ; [ DW_TAG_arg_variable ] [a] [line 1]
+!16 = !{!"0x102"} ; [ DW_TAG_expression ]
+!17 = !{i32 1, i32 13, !4, null}
+!18 = !{i32 2, i32 10, !4, null}
+!19 = !{i32 2, i32 3, !4, null}
+!20 = !{!"0x101\00a\0016777221\000", !9, !5, !8} ; [ DW_TAG_arg_variable ] [a] [line 5]
+!21 = !{i32 5, i32 13, !9, null}
+!22 = !{i32 6, i32 7, !23, null}
+!23 = !{!"0xb\006\007\000", !1, !9} ; [ DW_TAG_lexical_block ] [F:\users\akaylor\llvm-s\llvm\test\JitListener/multiple.c]
+!24 = !{i32 6, i32 7, !9, null}
+!25 = !{i32 7, i32 5, !26, null}
+!26 = !{!"0xb\006\0015\001", !1, !23} ; [ DW_TAG_lexical_block ] [F:\users\akaylor\llvm-s\llvm\test\JitListener/multiple.c]
+!27 = !{i32 9, i32 14, !9, null}
+!28 = !{i32 9, i32 10, !9, null}
+!29 = !{i32 9, i32 3, !9, null}
+!30 = !{i32 10, i32 1, !9, null}
+!31 = !{!"0x101\00a\0016777228\000", !10, !5, !8} ; [ DW_TAG_arg_variable ] [a] [line 12]
+!32 = !{i32 12, i32 15, !10, null}
+!33 = !{i32 13, i32 11, !10, null}
+!34 = !{i32 13, i32 3, !10, null}
+!35 = !{i32 15, i32 7, !36, null}
+!36 = !{!"0xb\0013\0014\002", !1, !10} ; [ DW_TAG_lexical_block ] [F:\users\akaylor\llvm-s\llvm\test\JitListener/multiple.c]
+!37 = !{i32 17, i32 7, !36, null}
+!38 = !{i32 19, i32 7, !36, null}
+!39 = !{i32 21, i32 1, !10, null}
Added: llvm/trunk/test/JitListener/simple.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/JitListener/simple.ll?rev=225554&view=auto
==============================================================================
--- llvm/trunk/test/JitListener/simple.ll (added)
+++ llvm/trunk/test/JitListener/simple.ll Fri Jan 9 16:53:24 2015
@@ -0,0 +1,54 @@
+; Verify the behavior of the IntelJITEventListener.
+; RUN: llvm-jitlistener %s | FileCheck %s
+
+; This test was created using the following file:
+;
+; 1: int foo(int a) {
+; 2: return a;
+; 3: }
+;
+
+; CHECK: Method load [1]: foo, Size = {{[0-9]+}}
+; CHECK: Line info @ {{[0-9]+}}: simple.c, line 1
+; CHECK: Line info @ {{[0-9]+}}: simple.c, line 2
+; CHECK: Method unload [1]
+
+; ModuleID = 'simple.c'
+
+; Function Attrs: nounwind uwtable
+define i32 @foo(i32 %a) #0 {
+entry:
+ %a.addr = alloca i32, align 4
+ store i32 %a, i32* %a.addr, align 4
+ call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !12, metadata !13), !dbg !14
+ %0 = load i32* %a.addr, align 4, !dbg !15
+ ret i32 %0, !dbg !16
+}
+
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
+
+attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { nounwind readnone }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!9, !10}
+!llvm.ident = !{!11}
+
+!0 = !{!"0x11\0012\00clang version 3.6.0 (trunk)\000\00\000\00\001", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [F:\users\akaylor\llvm-s\llvm\test\JitListener/simple.c] [DW_LANG_C99]
+!1 = !{!"simple.c", !"F:\5Cusers\5Cakaylor\5Cllvm-s\5Cllvm\5Ctest\5CJitListener"}
+!2 = !{}
+!3 = !{!4}
+!4 = !{!"0x2e\00foo\00foo\00\001\000\001\000\000\00256\000\001", !1, !5, !6, null, i32 (i32)* @foo, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo]
+!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [F:\users\akaylor\llvm-s\llvm\test\JitListener/simple.c]
+!6 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!7 = !{!8, !8}
+!8 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
+!9 = !{i32 2, !"Dwarf Version", i32 4}
+!10 = !{i32 2, !"Debug Info Version", i32 2}
+!11 = !{!"clang version 3.6.0 (trunk)"}
+!12 = !{!"0x101\00a\0016777217\000", !4, !5, !8} ; [ DW_TAG_arg_variable ] [a] [line 1]
+!13 = !{!"0x102"} ; [ DW_TAG_expression ]
+!14 = !{i32 1, i32 13, !4, null}
+!15 = !{i32 2, i32 10, !4, null}
+!16 = !{i32 2, i32 3, !4, null}
Removed: llvm/trunk/test/JitListener/test-common-symbols.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/JitListener/test-common-symbols.ll?rev=225553&view=auto
==============================================================================
--- llvm/trunk/test/JitListener/test-common-symbols.ll (original)
+++ llvm/trunk/test/JitListener/test-common-symbols.ll (removed)
@@ -1,113 +0,0 @@
-; RUN: llvm-jitlistener %s | FileCheck %s
-
-; CHECK: Method load [1]: main, Size = 164
-; CHECK: Method unload [1]
-
-; ModuleID = '<stdin>'
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
- at zero_int = common global i32 0, align 4
- at zero_arr = common global [10 x i32] zeroinitializer, align 16
- at zero_double = common global double 0.000000e+00, align 8
-
-define i32 @main() nounwind uwtable {
-entry:
- %retval = alloca i32, align 4
- %i = alloca i32, align 4
- store i32 0, i32* %retval
- %0 = load i32* @zero_int, align 4, !dbg !21
- %add = add nsw i32 %0, 5, !dbg !21
- %idxprom = sext i32 %add to i64, !dbg !21
- %arrayidx = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom, !dbg !21
- store i32 40, i32* %arrayidx, align 4, !dbg !21
- %1 = load double* @zero_double, align 8, !dbg !23
- %cmp = fcmp olt double %1, 1.000000e+00, !dbg !23
- br i1 %cmp, label %if.then, label %if.end, !dbg !23
-
-if.then: ; preds = %entry
- %2 = load i32* @zero_int, align 4, !dbg !24
- %add1 = add nsw i32 %2, 2, !dbg !24
- %idxprom2 = sext i32 %add1 to i64, !dbg !24
- %arrayidx3 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom2, !dbg !24
- store i32 70, i32* %arrayidx3, align 4, !dbg !24
- br label %if.end, !dbg !24
-
-if.end: ; preds = %if.then, %entry
- call void @llvm.dbg.declare(metadata i32* %i, metadata !25, metadata !{!"0x102"}), !dbg !27
- store i32 1, i32* %i, align 4, !dbg !28
- br label %for.cond, !dbg !28
-
-for.cond: ; preds = %for.inc, %if.end
- %3 = load i32* %i, align 4, !dbg !28
- %cmp4 = icmp slt i32 %3, 10, !dbg !28
- br i1 %cmp4, label %for.body, label %for.end, !dbg !28
-
-for.body: ; preds = %for.cond
- %4 = load i32* %i, align 4, !dbg !29
- %sub = sub nsw i32 %4, 1, !dbg !29
- %idxprom5 = sext i32 %sub to i64, !dbg !29
- %arrayidx6 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom5, !dbg !29
- %5 = load i32* %arrayidx6, align 4, !dbg !29
- %6 = load i32* %i, align 4, !dbg !29
- %idxprom7 = sext i32 %6 to i64, !dbg !29
- %arrayidx8 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom7, !dbg !29
- %7 = load i32* %arrayidx8, align 4, !dbg !29
- %add9 = add nsw i32 %5, %7, !dbg !29
- %8 = load i32* %i, align 4, !dbg !29
- %idxprom10 = sext i32 %8 to i64, !dbg !29
- %arrayidx11 = getelementptr inbounds [10 x i32]* @zero_arr, i32 0, i64 %idxprom10, !dbg !29
- store i32 %add9, i32* %arrayidx11, align 4, !dbg !29
- br label %for.inc, !dbg !31
-
-for.inc: ; preds = %for.body
- %9 = load i32* %i, align 4, !dbg !32
- %inc = add nsw i32 %9, 1, !dbg !32
- store i32 %inc, i32* %i, align 4, !dbg !32
- br label %for.cond, !dbg !32
-
-for.end: ; preds = %for.cond
- %10 = load i32* getelementptr inbounds ([10 x i32]* @zero_arr, i32 0, i64 9), align 4, !dbg !33
- %cmp12 = icmp eq i32 %10, 110, !dbg !33
- %cond = select i1 %cmp12, i32 0, i32 -1, !dbg !33
- ret i32 %cond, !dbg !33
-}
-
-declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!35}
-
-!0 = !{!"0x11\0012\00clang version 3.1 ()\001\00\000\00\000", !34, !1, !1, !3, !12, null} ; [ DW_TAG_compile_unit ]
-!1 = !{i32 0}
-!3 = !{!5}
-!5 = !{!"0x2e\00main\00main\00\006\000\001\000\006\000\000\000", !34, !6, !7, null, i32 ()* @main, null, null, !10} ; [ DW_TAG_subprogram ]
-!6 = !{!"0x29", !34} ; [ DW_TAG_file_type ]
-!7 = !{!"0x15\00\000\000\000\000\000\000", i32 0, !"", null, !8, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
-!8 = !{!9}
-!9 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ]
-!10 = !{!11}
-!11 = !{!"0x24"} ; [ DW_TAG_base_type ]
-!12 = !{!14, !15, !17}
-!14 = !{!"0x34\00zero_int\00zero_int\00\001\000\001", null, !6, !9, i32* @zero_int, null} ; [ DW_TAG_variable ]
-!15 = !{!"0x34\00zero_double\00zero_double\00\002\000\001", null, !6, !16, double* @zero_double, null} ; [ DW_TAG_variable ]
-!16 = !{!"0x24\00double\000\0064\0064\000\000\004", null, null} ; [ DW_TAG_base_type ]
-!17 = !{!"0x34\00zero_arr\00zero_arr\00\003\000\001", null, !6, !18, [10 x i32]* @zero_arr, null} ; [ DW_TAG_variable ]
-!18 = !{!"0x1\00\000\00320\0032\000\000", null, !"", !9, !19, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 320, align 32, offset 0] [from int]
-!19 = !{!20}
-!20 = !{!"0x21\000\0010"} ; [ DW_TAG_subrange_type ]
-!21 = !{i32 7, i32 5, !22, null}
-!22 = !{!"0xb\006\001\000", !34, !5} ; [ DW_TAG_lexical_block ]
-!23 = !{i32 9, i32 5, !22, null}
-!24 = !{i32 10, i32 9, !22, null}
-!25 = !{!"0x100\00i\0012\000", !26, !6, !9} ; [ DW_TAG_auto_variable ]
-!26 = !{!"0xb\0012\005\001", !34, !22} ; [ DW_TAG_lexical_block ]
-!27 = !{i32 12, i32 14, !26, null}
-!28 = !{i32 12, i32 19, !26, null}
-!29 = !{i32 13, i32 9, !30, null}
-!30 = !{!"0xb\0012\0034\002", !34, !26} ; [ DW_TAG_lexical_block ]
-!31 = !{i32 14, i32 5, !30, null}
-!32 = !{i32 12, i32 29, !26, null}
-!33 = !{i32 15, i32 5, !22, null}
-!34 = !{!"test-common-symbols.c", !"/store/store/llvm/build"}
-!35 = !{i32 1, !"Debug Info Version", i32 2}
Removed: llvm/trunk/test/JitListener/test-inline.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/JitListener/test-inline.ll?rev=225553&view=auto
==============================================================================
--- llvm/trunk/test/JitListener/test-inline.ll (original)
+++ llvm/trunk/test/JitListener/test-inline.ll (removed)
@@ -1,212 +0,0 @@
-; RUN: llvm-jitlistener %s | FileCheck %s
-
-; CHECK: Method load [1]: _Z15test_parametersPfPA2_dR11char_structPPitm, Size = 170
-; CHECK: Line info @ 0: test-inline.cpp, line 33
-; CHECK: Line info @ 35: test-inline.cpp, line 34
-; CHECK: Line info @ 165: test-inline.cpp, line 35
-; CHECK: Method load [2]: _Z3foov, Size = 3
-; CHECK: Line info @ 0: test-inline.cpp, line 28
-; CHECK: Line info @ 2: test-inline.cpp, line 29
-; CHECK: Line info @ 3: test-inline.cpp, line 29
-; CHECK: Method load [3]: main, Size = 146
-; CHECK: Line info @ 0: test-inline.cpp, line 39
-; CHECK: Line info @ 21: test-inline.cpp, line 41
-; CHECK: Line info @ 39: test-inline.cpp, line 42
-; CHECK: Line info @ 60: test-inline.cpp, line 44
-; CHECK: Line info @ 80: test-inline.cpp, line 48
-; CHECK: Line info @ 90: test-inline.cpp, line 45
-; CHECK: Line info @ 95: test-inline.cpp, line 46
-; CHECK: Line info @ 114: test-inline.cpp, line 48
-; CHECK: Line info @ 141: test-inline.cpp, line 49
-; CHECK: Line info @ 146: test-inline.cpp, line 49
-; CHECK: Method unload [1]
-; CHECK: Method unload [2]
-; CHECK: Method unload [3]
-
-; ModuleID = 'test-inline.cpp'
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-%struct.char_struct = type { i8, [2 x i8] }
-
- at compound_char = global %struct.char_struct zeroinitializer, align 1
- at _ZZ4mainE1d = private unnamed_addr constant [2 x [2 x double]] [[2 x double] [double 0.000000e+00, double 1.000000e+00], [2 x double] [double 2.000000e+00, double 3.000000e+00]], align 16
-
-define double @_Z15test_parametersPfPA2_dR11char_structPPitm(float* %pf, [2 x double]* %ppd, %struct.char_struct* %s, i32** %ppn, i16 zeroext %us, i64 %l) uwtable {
-entry:
- %pf.addr = alloca float*, align 8
- %ppd.addr = alloca [2 x double]*, align 8
- %s.addr = alloca %struct.char_struct*, align 8
- %ppn.addr = alloca i32**, align 8
- %us.addr = alloca i16, align 2
- %l.addr = alloca i64, align 8
- %result = alloca double, align 8
- store float* %pf, float** %pf.addr, align 8
- call void @llvm.dbg.declare(metadata float** %pf.addr, metadata !46, metadata !{!"0x102"}), !dbg !47
- store [2 x double]* %ppd, [2 x double]** %ppd.addr, align 8
- call void @llvm.dbg.declare(metadata [2 x double]** %ppd.addr, metadata !48, metadata !{!"0x102"}), !dbg !47
- store %struct.char_struct* %s, %struct.char_struct** %s.addr, align 8
- call void @llvm.dbg.declare(metadata %struct.char_struct** %s.addr, metadata !49, metadata !{!"0x102"}), !dbg !47
- store i32** %ppn, i32*** %ppn.addr, align 8
- call void @llvm.dbg.declare(metadata i32*** %ppn.addr, metadata !50, metadata !{!"0x102"}), !dbg !47
- store i16 %us, i16* %us.addr, align 2
- call void @llvm.dbg.declare(metadata i16* %us.addr, metadata !51, metadata !{!"0x102"}), !dbg !47
- store i64 %l, i64* %l.addr, align 8
- call void @llvm.dbg.declare(metadata i64* %l.addr, metadata !52, metadata !{!"0x102"}), !dbg !47
- call void @llvm.dbg.declare(metadata double* %result, metadata !53, metadata !{!"0x102"}), !dbg !55
- %0 = load float** %pf.addr, align 8, !dbg !55
- %arrayidx = getelementptr inbounds float* %0, i64 0, !dbg !55
- %1 = load float* %arrayidx, align 4, !dbg !55
- %conv = fpext float %1 to double, !dbg !55
- %2 = load [2 x double]** %ppd.addr, align 8, !dbg !55
- %arrayidx1 = getelementptr inbounds [2 x double]* %2, i64 1, !dbg !55
- %arrayidx2 = getelementptr inbounds [2 x double]* %arrayidx1, i32 0, i64 1, !dbg !55
- %3 = load double* %arrayidx2, align 8, !dbg !55
- %mul = fmul double %conv, %3, !dbg !55
- %4 = load %struct.char_struct** %s.addr, align 8, !dbg !55
- %c = getelementptr inbounds %struct.char_struct* %4, i32 0, i32 0, !dbg !55
- %5 = load i8* %c, align 1, !dbg !55
- %conv3 = sext i8 %5 to i32, !dbg !55
- %conv4 = sitofp i32 %conv3 to double, !dbg !55
- %mul5 = fmul double %mul, %conv4, !dbg !55
- %6 = load i16* %us.addr, align 2, !dbg !55
- %conv6 = zext i16 %6 to i32, !dbg !55
- %conv7 = sitofp i32 %conv6 to double, !dbg !55
- %mul8 = fmul double %mul5, %conv7, !dbg !55
- %7 = load i64* %l.addr, align 8, !dbg !55
- %conv9 = uitofp i64 %7 to double, !dbg !55
- %mul10 = fmul double %mul8, %conv9, !dbg !55
- %call = call i32 @_Z3foov(), !dbg !55
- %conv11 = sitofp i32 %call to double, !dbg !55
- %add = fadd double %mul10, %conv11, !dbg !55
- store double %add, double* %result, align 8, !dbg !55
- %8 = load double* %result, align 8, !dbg !56
- ret double %8, !dbg !56
-}
-
-declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
-
-define linkonce_odr i32 @_Z3foov() nounwind uwtable inlinehint {
-entry:
- ret i32 0, !dbg !57
-}
-
-define i32 @main(i32 %argc, i8** %argv) uwtable {
-entry:
- %retval = alloca i32, align 4
- %argc.addr = alloca i32, align 4
- %argv.addr = alloca i8**, align 8
- %s = alloca %struct.char_struct, align 1
- %f = alloca float, align 4
- %d = alloca [2 x [2 x double]], align 16
- %result = alloca double, align 8
- store i32 0, i32* %retval
- store i32 %argc, i32* %argc.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !59, metadata !{!"0x102"}), !dbg !60
- store i8** %argv, i8*** %argv.addr, align 8
- call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !61, metadata !{!"0x102"}), !dbg !60
- call void @llvm.dbg.declare(metadata %struct.char_struct* %s, metadata !62, metadata !{!"0x102"}), !dbg !64
- call void @llvm.dbg.declare(metadata float* %f, metadata !65, metadata !{!"0x102"}), !dbg !66
- store float 0.000000e+00, float* %f, align 4, !dbg !66
- call void @llvm.dbg.declare(metadata [2 x [2 x double]]* %d, metadata !67, metadata !{!"0x102"}), !dbg !70
- %0 = bitcast [2 x [2 x double]]* %d to i8*, !dbg !70
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast ([2 x [2 x double]]* @_ZZ4mainE1d to i8*), i64 32, i32 16, i1 false), !dbg !70
- %c = getelementptr inbounds %struct.char_struct* %s, i32 0, i32 0, !dbg !71
- store i8 97, i8* %c, align 1, !dbg !71
- %c2 = getelementptr inbounds %struct.char_struct* %s, i32 0, i32 1, !dbg !72
- %arrayidx = getelementptr inbounds [2 x i8]* %c2, i32 0, i64 0, !dbg !72
- store i8 48, i8* %arrayidx, align 1, !dbg !72
- %c21 = getelementptr inbounds %struct.char_struct* %s, i32 0, i32 1, !dbg !73
- %arrayidx2 = getelementptr inbounds [2 x i8]* %c21, i32 0, i64 1, !dbg !73
- store i8 49, i8* %arrayidx2, align 1, !dbg !73
- call void @llvm.dbg.declare(metadata double* %result, metadata !74, metadata !{!"0x102"}), !dbg !75
- %arraydecay = getelementptr inbounds [2 x [2 x double]]* %d, i32 0, i32 0, !dbg !75
- %call = call double @_Z15test_parametersPfPA2_dR11char_structPPitm(float* %f, [2 x double]* %arraydecay, %struct.char_struct* %s, i32** null, i16 zeroext 10, i64 42), !dbg !75
- store double %call, double* %result, align 8, !dbg !75
- %1 = load double* %result, align 8, !dbg !76
- %cmp = fcmp oeq double %1, 0.000000e+00, !dbg !76
- %cond = select i1 %cmp, i32 0, i32 -1, !dbg !76
- ret i32 %cond, !dbg !76
-}
-
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!78}
-
-!0 = !{!"0x11\004\00clang version 3.3 (ssh://akaylor@git-amr-1.devtools.intel.com:29418/ssg_llvm-clang2 gitosis at miro.kw.intel.com:clang.git 39450d0469e0d5589ad39fd0b20b5742750619a0) (ssh://akaylor@git-amr-1.devtools.intel.com:29418/ssg_llvm-llvm gitosis at miro.kw.intel.com:llvm.git 376642ed620ecae05b68c7bc81f79aeb2065abe0)\001\00\000\00\000", !77, !1, !1, !3, !43, null} ; [ DW_TAG_compile_unit ] [/home/akaylor/dev/test-inline.cpp] [DW_LANG_C_plus_plus]
-!1 = !{i32 0}
-!3 = !{!5, !35, !40}
-!5 = !{!"0x2e\00test_parameters\00test_parameters\00_Z15test_parametersPfPA2_dR11char_structPPitm\0032\000\001\000\006\00256\000\0033", !77, !6, !7, null, double (float*, [2 x double]*, %struct.char_struct*, i32**, i16, i64)* @_Z15test_parametersPfPA2_dR11char_structPPitm, null, null, !1} ; [ DW_TAG_subprogram ] [line 32] [def] [scope 33] [test_parameters]
-!6 = !{!"0x29", !77} ; [ DW_TAG_file_type ]
-!7 = !{!"0x15\00\000\000\000\000\000\000", i32 0, !"", null, !8, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
-!8 = !{!9, !10, !12, !16, !29, !32, !33}
-!9 = !{!"0x24\00double\000\0064\0064\000\000\004", null, null} ; [ DW_TAG_base_type ] [double] [line 0, size 64, align 64, offset 0, enc DW_ATE_float]
-!10 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !11} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from float]
-!11 = !{!"0x24\00float\000\0032\0032\000\000\004", null, null} ; [ DW_TAG_base_type ] [float] [line 0, size 32, align 32, offset 0, enc DW_ATE_float]
-!12 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !13} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from ]
-!13 = !{!"0x1\00\000\00128\0064\000\000", null, !"", !9, !14, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 128, align 64, offset 0] [from double]
-!14 = !{!15}
-!15 = !{!"0x21\000\002"} ; [ DW_TAG_subrange_type ] [0, 1]
-!16 = !{!"0x10\00\000\000\000\000\000", null, null, !17} ; [ DW_TAG_reference_type ] [line 0, size 0, align 0, offset 0] [from char_struct]
-!17 = !{!"0x13\00char_struct\0022\0024\008\000\000\000", !77, null, null, !18, null, null, null} ; [ DW_TAG_structure_type ] [char_struct] [line 22, size 24, align 8, offset 0] [def] [from ]
-!18 = !{!19, !21, !23}
-!19 = !{!"0xd\00c\0023\008\008\000\000", !77, !17, !20} ; [ DW_TAG_member ] [c] [line 23, size 8, align 8, offset 0] [from char]
-!20 = !{!"0x24\00char\000\008\008\000\000\006", null, null} ; [ DW_TAG_base_type ] [char] [line 0, size 8, align 8, offset 0, enc DW_ATE_signed_char]
-!21 = !{!"0xd\00c2\0024\0016\008\008\000", !77, !17, !22} ; [ DW_TAG_member ] [c2] [line 24, size 16, align 8, offset 8] [from ]
-!22 = !{!"0x1\00\000\0016\008\000\000", null, !"", !20, !14, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 16, align 8, offset 0] [from char]
-!23 = !{!"0x2e\00char_struct\00char_struct\00\0022\000\000\000\006\00320\000\0022", !77, !17, !24, null, null, null, i32 0, !27} ; [ DW_TAG_subprogram ] [line 22] [char_struct]
-!24 = !{!"0x15\00\000\000\000\000\000\000", i32 0, !"", null, !25, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
-!25 = !{null, !26}
-!26 = !{!"0xf\00\000\0064\0064\000\001088", i32 0, !"", !17} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from char_struct]
-!27 = !{!28}
-!28 = !{!"0x24"} ; [ DW_TAG_base_type ] [line 0, size 0, align 0, offset 0]
-!29 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !30} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from ]
-!30 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !31} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from int]
-!31 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
-!32 = !{!"0x24\00unsigned short\000\0016\0016\000\000\007", null, null} ; [ DW_TAG_base_type ] [unsigned short] [line 0, size 16, align 16, offset 0, enc DW_ATE_unsigned]
-!33 = !{!"0x26\00\000\000\000\000\000", null, !"", !34} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from long unsigned int]
-!34 = !{!"0x24\00long unsigned int\000\0064\0064\000\000\007", null, null} ; [ DW_TAG_base_type ] [long unsigned int] [line 0, size 64, align 64, offset 0, enc DW_ATE_unsigned]
-!35 = !{!"0x2e\00main\00main\00\0038\000\001\000\006\00256\000\0039", !77, !6, !36, null, i32 (i32, i8**)* @main, null, null, !1} ; [ DW_TAG_subprogram ] [line 38] [def] [scope 39] [main]
-!36 = !{!"0x15\00\000\000\000\000\000\000", i32 0, !"", null, !37, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
-!37 = !{!31, !31, !38}
-!38 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !39} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from ]
-!39 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !20} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from char]
-!40 = !{!"0x2e\00foo\00foo\00_Z3foov\0027\000\001\000\006\00256\000\0028", !77, !6, !41, null, i32 ()* @_Z3foov, null, null, !1} ; [ DW_TAG_subprogram ] [line 27] [def] [scope 28] [foo]
-!41 = !{!"0x15\00\000\000\000\000\000\000", i32 0, !"", null, !42, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
-!42 = !{!31}
-!43 = !{!45}
-!45 = !{!"0x34\00compound_char\00compound_char\00\0025\000\001", null, !6, !17, %struct.char_struct* @compound_char, null} ; [ DW_TAG_variable ] [compound_char] [line 25] [def]
-!46 = !{!"0x101\00pf\0016777248\000", !5, !6, !10} ; [ DW_TAG_arg_variable ] [pf] [line 32]
-!47 = !{i32 32, i32 0, !5, null}
-!48 = !{!"0x101\00ppd\0033554464\000", !5, !6, !12} ; [ DW_TAG_arg_variable ] [ppd] [line 32]
-!49 = !{!"0x101\00s\0050331680\000", !5, !6, !16} ; [ DW_TAG_arg_variable ] [s] [line 32]
-!50 = !{!"0x101\00ppn\0067108896\000", !5, !6, !29} ; [ DW_TAG_arg_variable ] [ppn] [line 32]
-!51 = !{!"0x101\00us\0083886112\000", !5, !6, !32} ; [ DW_TAG_arg_variable ] [us] [line 32]
-!52 = !{!"0x101\00l\00100663328\000", !5, !6, !33} ; [ DW_TAG_arg_variable ] [l] [line 32]
-!53 = !{!"0x100\00result\0034\000", !54, !6, !9} ; [ DW_TAG_auto_variable ] [result] [line 34]
-!54 = !{!"0xb\0033\000\000", !77, !5} ; [ DW_TAG_lexical_block ] [/home/akaylor/dev/test-inline.cpp]
-!55 = !{i32 34, i32 0, !54, null}
-!56 = !{i32 35, i32 0, !54, null}
-!57 = !{i32 29, i32 0, !58, null}
-!58 = !{!"0xb\0028\000\002", !77, !40} ; [ DW_TAG_lexical_block ] [/home/akaylor/dev/test-inline.cpp]
-!59 = !{!"0x101\00argc\0016777254\000", !35, !6, !31} ; [ DW_TAG_arg_variable ] [argc] [line 38]
-!60 = !{i32 38, i32 0, !35, null}
-!61 = !{!"0x101\00argv\0033554470\000", !35, !6, !38} ; [ DW_TAG_arg_variable ] [argv] [line 38]
-!62 = !{!"0x100\00s\0040\000", !63, !6, !17} ; [ DW_TAG_auto_variable ] [s] [line 40]
-!63 = !{!"0xb\0039\000\001", !77, !35} ; [ DW_TAG_lexical_block ] [/home/akaylor/dev/test-inline.cpp]
-!64 = !{i32 40, i32 0, !63, null}
-!65 = !{!"0x100\00f\0041\000", !63, !6, !11} ; [ DW_TAG_auto_variable ] [f] [line 41]
-!66 = !{i32 41, i32 0, !63, null}
-!67 = !{!"0x100\00d\0042\000", !63, !6, !68} ; [ DW_TAG_auto_variable ] [d] [line 42]
-!68 = !{!"0x1\00\000\00256\0064\000\000", null, !"", !9, !69, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 256, align 64, offset 0] [from double]
-!69 = !{!15, !15}
-!70 = !{i32 42, i32 0, !63, null}
-!71 = !{i32 44, i32 0, !63, null}
-!72 = !{i32 45, i32 0, !63, null}
-!73 = !{i32 46, i32 0, !63, null}
-!74 = !{!"0x100\00result\0048\000", !63, !6, !9} ; [ DW_TAG_auto_variable ] [result] [line 48]
-!75 = !{i32 48, i32 0, !63, null}
-!76 = !{i32 49, i32 0, !63, null}
-!77 = !{!"test-inline.cpp", !"/home/akaylor/dev"}
-!78 = !{i32 1, !"Debug Info Version", i32 2}
Removed: llvm/trunk/test/JitListener/test-parameters.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/JitListener/test-parameters.ll?rev=225553&view=auto
==============================================================================
--- llvm/trunk/test/JitListener/test-parameters.ll (original)
+++ llvm/trunk/test/JitListener/test-parameters.ll (removed)
@@ -1,211 +0,0 @@
-; RUN: llvm-jitlistener %s | FileCheck %s
-
-; CHECK: Method load [1]: _Z15test_parametersPfPA2_dR11char_structPPitm, Size = 170
-; CHECK: Line info @ 0: test-parameters.cpp, line 33
-; CHECK: Line info @ 35: test-parameters.cpp, line 34
-; CHECK: Line info @ 165: test-parameters.cpp, line 35
-; CHECK: Method load [2]: _Z3foov, Size = 3
-; CHECK: Line info @ 0: test-parameters.cpp, line 28
-; CHECK: Line info @ 2: test-parameters.cpp, line 29
-; CHECK: Method load [3]: main, Size = 146
-; CHECK: Line info @ 0: test-parameters.cpp, line 39
-; CHECK: Line info @ 21: test-parameters.cpp, line 41
-; CHECK: Line info @ 39: test-parameters.cpp, line 42
-; CHECK: Line info @ 60: test-parameters.cpp, line 44
-; CHECK: Line info @ 80: test-parameters.cpp, line 48
-; CHECK: Line info @ 90: test-parameters.cpp, line 45
-; CHECK: Line info @ 95: test-parameters.cpp, line 46
-; CHECK: Line info @ 114: test-parameters.cpp, line 48
-; CHECK: Line info @ 141: test-parameters.cpp, line 49
-; CHECK: Line info @ 146: test-parameters.cpp, line 49
-; CHECK: Method unload [1]
-; CHECK: Method unload [2]
-; CHECK: Method unload [3]
-
-; ModuleID = 'test-parameters.cpp'
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-%struct.char_struct = type { i8, [2 x i8] }
-
- at compound_char = global %struct.char_struct zeroinitializer, align 1
- at _ZZ4mainE1d = private unnamed_addr constant [2 x [2 x double]] [[2 x double] [double 0.000000e+00, double 1.000000e+00], [2 x double] [double 2.000000e+00, double 3.000000e+00]], align 16
-
-define i32 @_Z3foov() nounwind uwtable {
-entry:
- ret i32 0, !dbg !46
-}
-
-define double @_Z15test_parametersPfPA2_dR11char_structPPitm(float* %pf, [2 x double]* %ppd, %struct.char_struct* %s, i32** %ppn, i16 zeroext %us, i64 %l) nounwind uwtable {
-entry:
- %pf.addr = alloca float*, align 8
- %ppd.addr = alloca [2 x double]*, align 8
- %s.addr = alloca %struct.char_struct*, align 8
- %ppn.addr = alloca i32**, align 8
- %us.addr = alloca i16, align 2
- %l.addr = alloca i64, align 8
- %result = alloca double, align 8
- store float* %pf, float** %pf.addr, align 8
- call void @llvm.dbg.declare(metadata float** %pf.addr, metadata !48, metadata !{!"0x102"}), !dbg !49
- store [2 x double]* %ppd, [2 x double]** %ppd.addr, align 8
- call void @llvm.dbg.declare(metadata [2 x double]** %ppd.addr, metadata !50, metadata !{!"0x102"}), !dbg !49
- store %struct.char_struct* %s, %struct.char_struct** %s.addr, align 8
- call void @llvm.dbg.declare(metadata %struct.char_struct** %s.addr, metadata !51, metadata !{!"0x102"}), !dbg !49
- store i32** %ppn, i32*** %ppn.addr, align 8
- call void @llvm.dbg.declare(metadata i32*** %ppn.addr, metadata !52, metadata !{!"0x102"}), !dbg !49
- store i16 %us, i16* %us.addr, align 2
- call void @llvm.dbg.declare(metadata i16* %us.addr, metadata !53, metadata !{!"0x102"}), !dbg !49
- store i64 %l, i64* %l.addr, align 8
- call void @llvm.dbg.declare(metadata i64* %l.addr, metadata !54, metadata !{!"0x102"}), !dbg !49
- call void @llvm.dbg.declare(metadata double* %result, metadata !55, metadata !{!"0x102"}), !dbg !57
- %0 = load float** %pf.addr, align 8, !dbg !57
- %arrayidx = getelementptr inbounds float* %0, i64 0, !dbg !57
- %1 = load float* %arrayidx, align 4, !dbg !57
- %conv = fpext float %1 to double, !dbg !57
- %2 = load [2 x double]** %ppd.addr, align 8, !dbg !57
- %arrayidx1 = getelementptr inbounds [2 x double]* %2, i64 1, !dbg !57
- %arrayidx2 = getelementptr inbounds [2 x double]* %arrayidx1, i32 0, i64 1, !dbg !57
- %3 = load double* %arrayidx2, align 8, !dbg !57
- %mul = fmul double %conv, %3, !dbg !57
- %4 = load %struct.char_struct** %s.addr, align 8, !dbg !57
- %c = getelementptr inbounds %struct.char_struct* %4, i32 0, i32 0, !dbg !57
- %5 = load i8* %c, align 1, !dbg !57
- %conv3 = sext i8 %5 to i32, !dbg !57
- %conv4 = sitofp i32 %conv3 to double, !dbg !57
- %mul5 = fmul double %mul, %conv4, !dbg !57
- %6 = load i16* %us.addr, align 2, !dbg !57
- %conv6 = zext i16 %6 to i32, !dbg !57
- %conv7 = sitofp i32 %conv6 to double, !dbg !57
- %mul8 = fmul double %mul5, %conv7, !dbg !57
- %7 = load i64* %l.addr, align 8, !dbg !57
- %conv9 = uitofp i64 %7 to double, !dbg !57
- %mul10 = fmul double %mul8, %conv9, !dbg !57
- %call = call i32 @_Z3foov(), !dbg !57
- %conv11 = sitofp i32 %call to double, !dbg !57
- %add = fadd double %mul10, %conv11, !dbg !57
- store double %add, double* %result, align 8, !dbg !57
- %8 = load double* %result, align 8, !dbg !58
- ret double %8, !dbg !58
-}
-
-declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
-
-define i32 @main(i32 %argc, i8** %argv) nounwind uwtable {
-entry:
- %retval = alloca i32, align 4
- %argc.addr = alloca i32, align 4
- %argv.addr = alloca i8**, align 8
- %s = alloca %struct.char_struct, align 1
- %f = alloca float, align 4
- %d = alloca [2 x [2 x double]], align 16
- %result = alloca double, align 8
- store i32 0, i32* %retval
- store i32 %argc, i32* %argc.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !59, metadata !{!"0x102"}), !dbg !60
- store i8** %argv, i8*** %argv.addr, align 8
- call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !61, metadata !{!"0x102"}), !dbg !60
- call void @llvm.dbg.declare(metadata %struct.char_struct* %s, metadata !62, metadata !{!"0x102"}), !dbg !64
- call void @llvm.dbg.declare(metadata float* %f, metadata !65, metadata !{!"0x102"}), !dbg !66
- store float 0.000000e+00, float* %f, align 4, !dbg !66
- call void @llvm.dbg.declare(metadata [2 x [2 x double]]* %d, metadata !67, metadata !{!"0x102"}), !dbg !70
- %0 = bitcast [2 x [2 x double]]* %d to i8*, !dbg !70
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast ([2 x [2 x double]]* @_ZZ4mainE1d to i8*), i64 32, i32 16, i1 false), !dbg !70
- %c = getelementptr inbounds %struct.char_struct* %s, i32 0, i32 0, !dbg !71
- store i8 97, i8* %c, align 1, !dbg !71
- %c2 = getelementptr inbounds %struct.char_struct* %s, i32 0, i32 1, !dbg !72
- %arrayidx = getelementptr inbounds [2 x i8]* %c2, i32 0, i64 0, !dbg !72
- store i8 48, i8* %arrayidx, align 1, !dbg !72
- %c21 = getelementptr inbounds %struct.char_struct* %s, i32 0, i32 1, !dbg !73
- %arrayidx2 = getelementptr inbounds [2 x i8]* %c21, i32 0, i64 1, !dbg !73
- store i8 49, i8* %arrayidx2, align 1, !dbg !73
- call void @llvm.dbg.declare(metadata double* %result, metadata !74, metadata !{!"0x102"}), !dbg !75
- %arraydecay = getelementptr inbounds [2 x [2 x double]]* %d, i32 0, i32 0, !dbg !75
- %call = call double @_Z15test_parametersPfPA2_dR11char_structPPitm(float* %f, [2 x double]* %arraydecay, %struct.char_struct* %s, i32** null, i16 zeroext 10, i64 42), !dbg !75
- store double %call, double* %result, align 8, !dbg !75
- %1 = load double* %result, align 8, !dbg !76
- %cmp = fcmp oeq double %1, 0.000000e+00, !dbg !76
- %cond = select i1 %cmp, i32 0, i32 -1, !dbg !76
- ret i32 %cond, !dbg !76
-}
-
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!78}
-
-!0 = !{!"0x11\004\00clang version 3.3 (ssh://akaylor@git-amr-1.devtools.intel.com:29418/ssg_llvm-clang2 gitosis at miro.kw.intel.com:clang.git 39450d0469e0d5589ad39fd0b20b5742750619a0) (ssh://akaylor@git-amr-1.devtools.intel.com:29418/ssg_llvm-llvm gitosis at miro.kw.intel.com:llvm.git 376642ed620ecae05b68c7bc81f79aeb2065abe0)\001\00\000\00\000", !77, !1, !1, !3, !43, null} ; [ DW_TAG_compile_unit ] [/home/akaylor/dev/test-parameters.cpp] [DW_LANG_C_plus_plus]
-!1 = !{i32 0}
-!3 = !{!5, !10, !38}
-!5 = !{!"0x2e\00foo\00foo\00_Z3foov\0027\000\001\000\006\00256\000\0028", !77, !6, !7, null, i32 ()* @_Z3foov, null, null, !1} ; [ DW_TAG_subprogram ] [line 27] [def] [scope 28] [foo]
-!6 = !{!"0x29", !77} ; [ DW_TAG_file_type ]
-!7 = !{!"0x15\00\000\000\000\000\000\000", i32 0, !"", null, !8, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
-!8 = !{!9}
-!9 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
-!10 = !{!"0x2e\00test_parameters\00test_parameters\00_Z15test_parametersPfPA2_dR11char_structPPitm\0032\000\001\000\006\00256\000\0033", !77, !6, !11, null, double (float*, [2 x double]*, %struct.char_struct*, i32**, i16, i64)* @_Z15test_parametersPfPA2_dR11char_structPPitm, null, null, !1} ; [ DW_TAG_subprogram ] [line 32] [def] [scope 33] [test_parameters]
-!11 = !{!"0x15\00\000\000\000\000\000\000", i32 0, !"", null, !12, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
-!12 = !{!13, !14, !16, !20, !33, !35, !36}
-!13 = !{!"0x24\00double\000\0064\0064\000\000\004", null, null} ; [ DW_TAG_base_type ] [double] [line 0, size 64, align 64, offset 0, enc DW_ATE_float]
-!14 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !15} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from float]
-!15 = !{!"0x24\00float\000\0032\0032\000\000\004", null, null} ; [ DW_TAG_base_type ] [float] [line 0, size 32, align 32, offset 0, enc DW_ATE_float]
-!16 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !17} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from ]
-!17 = !{!"0x1\00\000\00128\0064\000\000", null, !"", !13, !18, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 128, align 64, offset 0] [from double]
-!18 = !{!19}
-!19 = !{!"0x21\000\002"} ; [ DW_TAG_subrange_type ] [0, 1]
-!20 = !{!"0x10\00\000\000\000\000\000", null, null, !21} ; [ DW_TAG_reference_type ] [line 0, size 0, align 0, offset 0] [from char_struct]
-!21 = !{!"0x13\00char_struct\0022\0024\008\000\000\000", !77, null, null, !22, null, null, null} ; [ DW_TAG_structure_type ] [char_struct] [line 22, size 24, align 8, offset 0] [def] [from ]
-!22 = !{!23, !25, !27}
-!23 = !{!"0xd\00c\0023\008\008\000\000", !77, !21, !24} ; [ DW_TAG_member ] [c] [line 23, size 8, align 8, offset 0] [from char]
-!24 = !{!"0x24\00char\000\008\008\000\000\006", null, null} ; [ DW_TAG_base_type ] [char] [line 0, size 8, align 8, offset 0, enc DW_ATE_signed_char]
-!25 = !{!"0xd\00c2\0024\0016\008\008\000", !77, !21, !26} ; [ DW_TAG_member ] [c2] [line 24, size 16, align 8, offset 8] [from ]
-!26 = !{!"0x1\00\000\0016\008\000\000", null, !"", !24, !18, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 16, align 8, offset 0] [from char]
-!27 = !{!"0x2e\00char_struct\00char_struct\00\0022\000\000\000\006\00320\000\0022", !77, !21, !28, null, null, null, i32 0, !31} ; [ DW_TAG_subprogram ] [line 22] [char_struct]
-!28 = !{!"0x15\00\000\000\000\000\000\000", i32 0, !"", null, !29, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
-!29 = !{null, !30}
-!30 = !{!"0xf\00\000\0064\0064\000\001088", i32 0, !"", !21} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from char_struct]
-!31 = !{!32}
-!32 = !{!"0x24"} ; [ DW_TAG_base_type ] [line 0, size 0, align 0, offset 0]
-!33 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !34} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from ]
-!34 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !9} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from int]
-!35 = !{!"0x24\00unsigned short\000\0016\0016\000\000\007", null, null} ; [ DW_TAG_base_type ] [unsigned short] [line 0, size 16, align 16, offset 0, enc DW_ATE_unsigned]
-!36 = !{!"0x26\00\000\000\000\000\000", null, !"", !37} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from long unsigned int]
-!37 = !{!"0x24\00long unsigned int\000\0064\0064\000\000\007", null, null} ; [ DW_TAG_base_type ] [long unsigned int] [line 0, size 64, align 64, offset 0, enc DW_ATE_unsigned]
-!38 = !{!"0x2e\00main\00main\00\0038\000\001\000\006\00256\000\0039", !77, !6, !39, null, i32 (i32, i8**)* @main, null, null, !1} ; [ DW_TAG_subprogram ] [line 38] [def] [scope 39] [main]
-!39 = !{!"0x15\00\000\000\000\000\000\000", i32 0, !"", null, !40, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
-!40 = !{!9, !9, !41}
-!41 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !42} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from ]
-!42 = !{!"0xf\00\000\0064\0064\000\000", null, !"", !24} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from char]
-!43 = !{!45}
-!45 = !{!"0x34\00compound_char\00compound_char\00\0025\000\001", null, !6, !21, %struct.char_struct* @compound_char, null} ; [ DW_TAG_variable ] [compound_char] [line 25] [def]
-!46 = !{i32 29, i32 0, !47, null}
-!47 = !{!"0xb\0028\000\000", !77, !5} ; [ DW_TAG_lexical_block ] [/home/akaylor/dev/test-parameters.cpp]
-!48 = !{!"0x101\00pf\0016777248\000", !10, !6, !14} ; [ DW_TAG_arg_variable ] [pf] [line 32]
-!49 = !{i32 32, i32 0, !10, null}
-!50 = !{!"0x101\00ppd\0033554464\000", !10, !6, !16} ; [ DW_TAG_arg_variable ] [ppd] [line 32]
-!51 = !{!"0x101\00s\0050331680\000", !10, !6, !20} ; [ DW_TAG_arg_variable ] [s] [line 32]
-!52 = !{!"0x101\00ppn\0067108896\000", !10, !6, !33} ; [ DW_TAG_arg_variable ] [ppn] [line 32]
-!53 = !{!"0x101\00us\0083886112\000", !10, !6, !35} ; [ DW_TAG_arg_variable ] [us] [line 32]
-!54 = !{!"0x101\00l\00100663328\000", !10, !6, !36} ; [ DW_TAG_arg_variable ] [l] [line 32]
-!55 = !{!"0x100\00result\0034\000", !56, !6, !13} ; [ DW_TAG_auto_variable ] [result] [line 34]
-!56 = !{!"0xb\0033\000\001", !77, !10} ; [ DW_TAG_lexical_block ] [/home/akaylor/dev/test-parameters.cpp]
-!57 = !{i32 34, i32 0, !56, null}
-!58 = !{i32 35, i32 0, !56, null}
-!59 = !{!"0x101\00argc\0016777254\000", !38, !6, !9} ; [ DW_TAG_arg_variable ] [argc] [line 38]
-!60 = !{i32 38, i32 0, !38, null}
-!61 = !{!"0x101\00argv\0033554470\000", !38, !6, !41} ; [ DW_TAG_arg_variable ] [argv] [line 38]
-!62 = !{!"0x100\00s\0040\000", !63, !6, !21} ; [ DW_TAG_auto_variable ] [s] [line 40]
-!63 = !{!"0xb\0039\000\002", !77, !38} ; [ DW_TAG_lexical_block ] [/home/akaylor/dev/test-parameters.cpp]
-!64 = !{i32 40, i32 0, !63, null}
-!65 = !{!"0x100\00f\0041\000", !63, !6, !15} ; [ DW_TAG_auto_variable ] [f] [line 41]
-!66 = !{i32 41, i32 0, !63, null}
-!67 = !{!"0x100\00d\0042\000", !63, !6, !68} ; [ DW_TAG_auto_variable ] [d] [line 42]
-!68 = !{!"0x1\00\000\00256\0064\000\000", null, !"", !13, !69, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 256, align 64, offset 0] [from double]
-!69 = !{!19, !19}
-!70 = !{i32 42, i32 0, !63, null}
-!71 = !{i32 44, i32 0, !63, null}
-!72 = !{i32 45, i32 0, !63, null}
-!73 = !{i32 46, i32 0, !63, null}
-!74 = !{!"0x100\00result\0048\000", !63, !6, !13} ; [ DW_TAG_auto_variable ] [result] [line 48]
-!75 = !{i32 48, i32 0, !63, null}
-!76 = !{i32 49, i32 0, !63, null}
-!77 = !{!"test-parameters.cpp", !"/home/akaylor/dev"}
-!78 = !{i32 1, !"Debug Info Version", i32 2}
More information about the llvm-commits
mailing list