-fsplit-lto-unit bitcode writer crash with ifunc and type metadata
$ cat /tmp/c.ll
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-unknown-linux-android24"
@i = ifunc ptr (ptr, i64), ptr @hoge
define ptr @hoge() !type !0 {
bb:
ret ptr null
}
!0 = !{i64 0, !1}
!1 = distinct !{}
$ clang++ "-target" "aarch64-unknown-linux-android24" "-flto=thin" -fsplit-lto-unit /tmp/c.ll -o /dev/null -c
clang++: ../../llvm/lib/IR/ModuleSummaryIndex.cpp:173: GlobalValueSummary *llvm::ModuleSummaryIndex::getGlobalValueSummary(uint64_t, bool) const: Assertion `VI && "GlobalValue not found in index"' failed.
@teresajohnson
See also https://github.com/llvm/llvm-project/issues/57870
I wonder if this D82745 will fix it. It went through a couple rounds of review and it looks like I missed the fact that it was waiting for me and another reviewer to take another look. The patch relates to correctly summarizing ifunc. If so, let me ping the author and prioritize getting that reviewed.
@teresajohnson D82745 alone is not enough, I have an additional patch for this, I'm going to upstream it.
I rebased the D82745, I can move it forward if needed.
https://reviews.llvm.org/D144982, we have tested with Chromium and it works well there.
@teresajohnson D82745 alone is not enough, I have an additional patch for this, I'm going to upstream it.
I rebased the D82745, I can move it forward if needed.
Thanks! Does your new patch depend on D82745, or are they orthogonal fixes?
https://reviews.llvm.org/D144982, we have tested with Chromium and it works well there.
Does Chromium also need D82745?
@teresajohnson D82745 alone is not enough, I have an additional patch for this, I'm going to upstream it. I rebased the D82745, I can move it forward if needed.
Thanks! Does your new patch depend on D82745, or are they orthogonal fixes? They are orthogonal.
https://reviews.llvm.org/D144982, we have tested with Chromium and it works well there.
Does Chromium also need D82745? No. D144982 is enough in the Chromium's usecase.