
As pointed out in https://discourse.llvm.org/t/undeterministic-thin-index-file/69985, the block count added to distributed ThinLTO index files breaks incremental builds on ThinLTO - if any linked file has a different number of BBs, then the accumulated sum placed in the index files will change, causing all ThinLTO backend compiles to be redone. The block count is only used for scaling of partial sample profiles, and was added in D80403 for D79831. This patch simply removes this field from the index files of non partial sample profile compiles, which is NFC on the output of the compiler. We subsequently need to see if this can be removed for partial sample profiles without signficant performance loss, or redesigned in a way that does not destroy caching. Differential Revision: https://reviews.llvm.org/D148746
45 lines
1.2 KiB
LLVM
45 lines
1.2 KiB
LLVM
; Test to check the callgraph for calls to casts.
|
|
; RUN: opt -module-summary %s -o %t.o
|
|
; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
|
|
; PR34966
|
|
|
|
; CHECK: <GLOBALVAL_SUMMARY_BLOCK
|
|
; CHECK-NEXT: <VERSION
|
|
; CHECK-NEXT: <FLAGS
|
|
; "op7" is a call to "callee" function.
|
|
; CHECK-NEXT: <PERMODULE {{.*}} op7=3 op8=[[ALIASID:[0-9]+]]/>
|
|
; "another_caller" has only references but no calls.
|
|
; CHECK-NEXT: <PERMODULE {{.*}}/>
|
|
; CHECK-NEXT: <PERMODULE {{.*}} op0=[[ALIASEEID:[0-9]+]]
|
|
; CHECK-NEXT: <ALIAS {{.*}} op0=[[ALIASID]] {{.*}} op2=[[ALIASEEID]]/>
|
|
; CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK>
|
|
|
|
; ModuleID = 'thinlto-function-summary-callgraph-cast.ll'
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
define void @caller() {
|
|
call void @callee()
|
|
call void @analias()
|
|
ret void
|
|
}
|
|
|
|
define void @another_caller() {
|
|
; Test calls that aren't handled either as direct or indirect.
|
|
call void getelementptr (i8, ptr @f, i64 ptrtoint (ptr @g to i64))()
|
|
ret void
|
|
}
|
|
|
|
declare void @callee(...)
|
|
|
|
@analias = alias void (...), ptr @aliasee
|
|
|
|
define void @aliasee() {
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
declare void @f()
|
|
declare void @g()
|
|
@global = extern_weak global i32
|