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. https://github.com/llvm/llvm-project/pull/198702 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
