You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.167
Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
parent
e19d552987
commit
b084638f15
@ -1,37 +0,0 @@
|
||||
define void @globalfunc1() {
|
||||
entry:
|
||||
call void @trampoline()
|
||||
ret void
|
||||
}
|
||||
; Adds an artificial level in the call graph to reduce the importing threshold
|
||||
define void @trampoline() {
|
||||
entry:
|
||||
call void @largefunction()
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @globalfunc2() {
|
||||
entry:
|
||||
call void @largefunction()
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
; Size is 5: if two layers below in the call graph the threshold will be 4,
|
||||
; but if only one layer below the threshold will be 7.
|
||||
define void @largefunction() {
|
||||
entry:
|
||||
call void @staticfunc2()
|
||||
call void @staticfunc2()
|
||||
call void @staticfunc2()
|
||||
call void @staticfunc2()
|
||||
call void @staticfunc2()
|
||||
ret void
|
||||
}
|
||||
|
||||
define internal void @staticfunc2() {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
|
||||
|
@ -1,154 +0,0 @@
|
||||
@globalvar = global i32 1, align 4
|
||||
@staticvar = internal global i32 1, align 4
|
||||
@staticconstvar = internal unnamed_addr constant [2 x i32] [i32 10, i32 20], align 4
|
||||
@commonvar = common global i32 0, align 4
|
||||
@P = internal global void ()* null, align 8
|
||||
|
||||
@weakalias = weak alias void (...), bitcast (void ()* @globalfunc1 to void (...)*)
|
||||
@analias = alias void (...), bitcast (void ()* @globalfunc2 to void (...)*)
|
||||
@linkoncealias = alias void (...), bitcast (void ()* @linkoncefunc to void (...)*)
|
||||
|
||||
define void @globalfunc1() #0 {
|
||||
entry:
|
||||
call void @funcwithpersonality()
|
||||
call void (...) @variadic()
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @globalfunc2() #0 {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
|
||||
define linkonce_odr void @linkoncefunc() #0 {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @referencestatics(i32 %i) #0 {
|
||||
entry:
|
||||
%i.addr = alloca i32, align 4
|
||||
store i32 %i, i32* %i.addr, align 4
|
||||
%call = call i32 @staticfunc()
|
||||
%0 = load i32, i32* @staticvar, align 4
|
||||
%add = add nsw i32 %call, %0
|
||||
%1 = load i32, i32* %i.addr, align 4
|
||||
%idxprom = sext i32 %1 to i64
|
||||
%arrayidx = getelementptr inbounds [2 x i32], [2 x i32]* @staticconstvar, i64 0, i64 %idxprom
|
||||
%2 = load i32, i32* %arrayidx, align 4
|
||||
%add1 = add nsw i32 %add, %2
|
||||
ret i32 %add1
|
||||
}
|
||||
|
||||
define i32 @referenceglobals(i32 %i) #0 {
|
||||
entry:
|
||||
%i.addr = alloca i32, align 4
|
||||
store i32 %i, i32* %i.addr, align 4
|
||||
call void @globalfunc1()
|
||||
%0 = load i32, i32* @globalvar, align 4
|
||||
ret i32 %0
|
||||
}
|
||||
|
||||
define i32 @referencecommon(i32 %i) #0 {
|
||||
entry:
|
||||
%i.addr = alloca i32, align 4
|
||||
store i32 %i, i32* %i.addr, align 4
|
||||
%0 = load i32, i32* @commonvar, align 4
|
||||
ret i32 %0
|
||||
}
|
||||
|
||||
define void @setfuncptr() #0 {
|
||||
entry:
|
||||
store void ()* @staticfunc2, void ()** @P, align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @callfuncptr() #0 {
|
||||
entry:
|
||||
%0 = load void ()*, void ()** @P, align 8
|
||||
call void %0()
|
||||
ret void
|
||||
}
|
||||
|
||||
@weakvar = weak global i32 1, align 4
|
||||
define weak void @weakfunc() #0 {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
|
||||
define linkonce void @linkoncefunc2() #0 {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
|
||||
define internal i32 @staticfunc() #0 {
|
||||
entry:
|
||||
ret i32 1
|
||||
}
|
||||
|
||||
declare i32 @__gxx_personality_v0(...)
|
||||
|
||||
; Add enough instructions to prevent import with inst limit of 5
|
||||
define internal void @funcwithpersonality() #2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
entry:
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
ret void
|
||||
}
|
||||
|
||||
define internal void @staticfunc2() #0 {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @referencelargelinkonce() #0 {
|
||||
entry:
|
||||
call void @linkonceodr()
|
||||
ret void
|
||||
}
|
||||
|
||||
; A large enough linkonce_odr function that should never be imported
|
||||
define linkonce_odr void @linkonceodr() #0 {
|
||||
entry:
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
call void @globalfunc2()
|
||||
ret void
|
||||
}
|
||||
|
||||
; Variadic function should not be imported because inliner doesn't handle it.
|
||||
define void @variadic(...) {
|
||||
ret void
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
declare void @analias()
|
||||
|
||||
define void @callanalias() #0 {
|
||||
entry:
|
||||
call void @analias()
|
||||
ret void
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
; ModuleID = 'funcimport_debug.o'
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
; Function Attrs: nounwind uwtable
|
||||
define void @func() #0 !dbg !4 {
|
||||
entry:
|
||||
ret void, !dbg !10
|
||||
}
|
||||
|
||||
attributes #0 = { nounwind uwtable "disable-tail-calls"="false" "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" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
|
||||
!llvm.dbg.cu = !{!0}
|
||||
!llvm.module.flags = !{!7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 255685) (llvm/trunk 255682)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
|
||||
!1 = !DIFile(filename: "funcimport_debug.c", directory: ".")
|
||||
!2 = !{}
|
||||
!4 = distinct !DISubprogram(name: "func", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2)
|
||||
!5 = !DISubroutineType(types: !6)
|
||||
!6 = !{null}
|
||||
!7 = !{i32 2, !"Dwarf Version", i32 4}
|
||||
!8 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
!9 = !{!"clang version 3.8.0 (trunk 255685) (llvm/trunk 255682)"}
|
||||
!10 = !DILocation(line: 2, column: 1, scope: !4)
|
@ -1,10 +0,0 @@
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@link = internal global i32 0, align 4
|
||||
|
||||
; Function Attrs: norecurse nounwind readnone uwtable
|
||||
define nonnull i32* @get_link() local_unnamed_addr {
|
||||
ret i32* @link
|
||||
}
|
||||
|
@ -1,81 +0,0 @@
|
||||
; ModuleID = 'thinlto-function-summary-callgraph-profile-summary2.ll'
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
|
||||
define void @hot1() #1 {
|
||||
ret void
|
||||
}
|
||||
define void @hot2() #1 !prof !20 {
|
||||
call void @calledFromHot()
|
||||
call void @calledFromHot()
|
||||
ret void
|
||||
}
|
||||
define void @hot3() #1 !prof !20 {
|
||||
call void @calledFromHot()
|
||||
call void @calledFromHot()
|
||||
call void @calledFromHot()
|
||||
ret void
|
||||
}
|
||||
define void @cold() #1 !prof !0 {
|
||||
ret void
|
||||
}
|
||||
define void @cold2() #1 !prof !0 {
|
||||
call void @calledFromCold()
|
||||
call void @calledFromCold()
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @none1() #1 {
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @none2() #1 {
|
||||
call void @calledFromNone()
|
||||
ret void
|
||||
}
|
||||
define void @none3() #1 {
|
||||
call void @calledFromNone()
|
||||
call void @calledFromNone()
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @calledFromCold() {
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @calledFromHot() !prof !20 {
|
||||
call void @calledFromHot2()
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @calledFromHot2() !prof !20 {
|
||||
call void @calledFromHot3()
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @calledFromNone() !prof !0 {
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @calledFromHot3()
|
||||
|
||||
!0 = !{!"function_entry_count", i64 1}
|
||||
!20 = !{!"function_entry_count", i64 110}
|
||||
|
||||
!llvm.module.flags = !{!1}
|
||||
|
||||
!1 = !{i32 1, !"ProfileSummary", !2}
|
||||
!2 = !{!3, !4, !5, !6, !7, !8, !9, !10}
|
||||
!3 = !{!"ProfileFormat", !"InstrProf"}
|
||||
!4 = !{!"TotalCount", i64 10000}
|
||||
!5 = !{!"MaxCount", i64 10}
|
||||
!6 = !{!"MaxInternalCount", i64 1}
|
||||
!7 = !{!"MaxFunctionCount", i64 1000}
|
||||
!8 = !{!"NumCounts", i64 3}
|
||||
!9 = !{!"NumFunctions", i64 3}
|
||||
!10 = !{!"DetailedSummary", !11}
|
||||
!11 = !{!12, !13, !14}
|
||||
!12 = !{i32 10000, i64 100, i32 1}
|
||||
!13 = !{i32 999000, i64 100, i32 1}
|
||||
!14 = !{i32 999999, i64 1, i32 2}
|
@ -1,42 +0,0 @@
|
||||
; ModuleID = 'thinlto-function-summary-callgraph-profile-summary2.ll'
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
|
||||
define void @hot() #1 !prof !28 {
|
||||
call void @calledFromHot()
|
||||
ret void
|
||||
}
|
||||
|
||||
; 9 instructions so it is above decayed cold threshold of 7 and below
|
||||
; decayed hot threshold of 10.
|
||||
define void @calledFromHot() !prof !28 {
|
||||
%b = alloca i32, align 4
|
||||
store i32 1, i32* %b, align 4
|
||||
store i32 1, i32* %b, align 4
|
||||
store i32 1, i32* %b, align 4
|
||||
store i32 1, i32* %b, align 4
|
||||
store i32 1, i32* %b, align 4
|
||||
store i32 1, i32* %b, align 4
|
||||
store i32 1, i32* %b, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
!llvm.module.flags = !{!1}
|
||||
|
||||
!1 = !{i32 1, !"ProfileSummary", !2}
|
||||
!2 = !{!3, !4, !5, !6, !7, !8, !9, !10}
|
||||
!3 = !{!"ProfileFormat", !"InstrProf"}
|
||||
!4 = !{!"TotalCount", i64 222}
|
||||
!5 = !{!"MaxCount", i64 110}
|
||||
!6 = !{!"MaxInternalCount", i64 1}
|
||||
!7 = !{!"MaxFunctionCount", i64 110}
|
||||
!8 = !{!"NumCounts", i64 4}
|
||||
!9 = !{!"NumFunctions", i64 3}
|
||||
!10 = !{!"DetailedSummary", !11}
|
||||
!11 = !{!12, !13, !14}
|
||||
!12 = !{i32 10000, i64 110, i32 2}
|
||||
!13 = !{i32 999000, i64 2, i32 4}
|
||||
!14 = !{i32 999999, i64 2, i32 4}
|
||||
!28 = !{!"function_entry_count", i64 110}
|
||||
!29 = !{!"function_entry_count", i64 1}
|
@ -1,11 +0,0 @@
|
||||
@myvar = internal constant i8 1, align 1
|
||||
@llvm.used = appending global [1 x i8*] [i8* @myvar], section "llvm.metadata"
|
||||
|
||||
define void @foo(i64* %v) #0 {
|
||||
entry:
|
||||
%v.addr = alloca i64*, align 8
|
||||
store i64* %v, i64** %v.addr, align 8
|
||||
%0 = load i64*, i64** %v.addr, align 8
|
||||
call void asm sideeffect "movzbl myvar(%rip), %eax\0A\09movq %rax, $0\0A\09", "=*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i64* %0) #1
|
||||
ret void
|
||||
}
|
Reference in New Issue
Block a user