[PATCH] D104976: [AsmWriter] Properly handle uselistorder for global symbols

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 15:56:17 PDT 2021


dexonsmith added a comment.

In D104976#2845294 <https://reviews.llvm.org/D104976#2845294>, @dexonsmith wrote:

>> Currently, AsmWriter will stick uselistorder directives for global values inside individual functions.
>
> FWIW (not much I think), I vaguely remember a desire (mine? reviewers?) to avoid top-level `uselistorder` directives... but I guess at some point the dam broke. This is easier to reason about.

In case you're interested, more of the history just paged itself in for me. IIRC, an early design for this directive named the users directly, requiring a directive in each function that had locals that used a global value. The final design, as you've seen, uses a shuffle vector based on predicting the "natural" order in the reader. This can live quite happily at the global scope (as you've done in this patch).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104976



More information about the llvm-commits mailing list