[PATCH] D156525: [ThinLTO] Use module hash instead of module ID for cache key

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 06:47:18 PDT 2023


nikic added a comment.

In D156525#4542312 <https://reviews.llvm.org/D156525#4542312>, @tejohnson wrote:

>> A caveat here is that this doesn't quite work for linkonce_odr functions, because it seems like the function from the first encountered module gets picked (rather than say, the prevailing function). This doesn't really matter for Rust's purposes (because it does not use linkonce_odr linkage), but may still be worth addressing. For now I'm using a variant of the test using internal instead of linkonce_odr functions.
>
> Can you clarify what doesn't work with linkonce_odr? This patch shouldn't affect any importing decisions, which have already been made, so the import list sorted here should only include a single copy of a linkonce_odr function.

What I'm seeing is that the linkonce_odr function will be imported from either a.bc or b.bc, depending on the order of llvm-lto2 arguments. The patch doesn't affect importing decisions, it's just that the test case doesn't work with linkonce_odr, because it ends up still being order-dependent.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156525/new/

https://reviews.llvm.org/D156525



More information about the llvm-commits mailing list