Files
clang-p2996/llvm/test/Transforms/PGOProfile/Inputs/thinlto_samplepgo_icp3.ll
Teresa Johnson f625118ec7 [ThinLTO] Fix dead stripping analysis for SamplePGO
Summary:
The fix for dead stripping analysis in the case of SamplePGO indirect
calls to local functions (r313151) introduced the possibility of an
infinite loop.

Make sure we check for the value being already live after we update it
for SamplePGO indirect call handling.

Reviewers: danielcdh

Subscribers: mehdi_amini, inglorion, llvm-commits, eraman

Differential Revision: https://reviews.llvm.org/D38086

llvm-svn: 313766
2017-09-20 17:09:47 +00:00

32 lines
1.0 KiB
LLVM

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@fptr = external local_unnamed_addr global void ()*, align 8
; Function Attrs: norecurse nounwind uwtable
define void @_Z6updatei(i32 %i) local_unnamed_addr #0 {
entry:
store void ()* @_ZL3foov, void ()** @fptr, align 8
ret void
}
; Function Attrs: nounwind readnone uwtable
define internal void @_ZL3foov() !prof !34 {
entry:
%0 = load void ()*, void ()** @fptr, align 8
tail call void %0(), !prof !40
ret void
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3}
!llvm.ident = !{!31}
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 5.0.0 (trunk 297016)", isOptimized: true, runtimeVersion: 0, emissionKind: NoDebug, enums: !2)
!1 = !DIFile(filename: "b.cc", directory: "/ssd/llvm/abc/small")
!2 = !{}
!3 = !{i32 2, !"Debug Info Version", i32 3}
!31 = !{!"clang version 5.0.0 (trunk 297016)"}
!34 = !{!"function_entry_count", i64 1}
!40 = !{!"VP", i32 0, i64 3000, i64 -8789629626369651636, i64 3000}