[llvm] Extend the mismatch attr check to all non-exact definition function (PR #88035)

Lei Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 12:10:39 PDT 2024


wlei-llvm wrote:

> Hmm, tested on our internal services, it still ran into the assertion.. the function linkage type is `internal`, it's very weird. How would an `internal` function be replaced by another definition.

OK, so this is because there is no profile loaded for this function in pre-link time (so it never run this `profileIsValid`), the attr is not set(unknown). 
but in post-link time, profile is loaded(likely from other func's children profile), then find the state is mismatch.

This is probably not easy to quickly fix.. (Seems we need  a three state for the attr: matched, mismatch, unknown..., maybe we don't need those complexity or just remove the assertion) 

cc @WenleiHe 

https://github.com/llvm/llvm-project/pull/88035


More information about the llvm-commits mailing list