[clang] [llvm] [ThinLTO][Split] Split module for parallel compilation in backend (1/N) (PR #198702)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 19:04:05 PDT 2026
mmjjpp wrote:
> Now that PR #221181 has been merged, I have rebased the changes and updated the unnamed.ll test accordingly.
>
> During this process, I discovered a bug in the original logic: sorting the FWDWorkList was happening before externalizeGlobal() was called. Because our sorting comparator falls back to alphabetical name comparison when costs are identical, sorting unnamed internal functions (like @0 and @1) before they receive their stable names leads to non-deterministic ordering. This non-determinism can result in inconsistent partitioning.
>
> To fix this, I extracted the sorting logic into sortWorkList() and deferred its execution until after all globals are externalized and assigned stable names.
>
> @teresajohnson , please let me know if you have any questions or further comments.
@teresajohnson, All feedback should be addressed now. Let me know if anything else is needed before we can move forward.
https://github.com/llvm/llvm-project/pull/198702
More information about the llvm-commits
mailing list