[PATCH] D104950: [OpaquePtr] Support forward references in textual IR

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


dexonsmith added a comment.

In D104950#2842277 <https://reviews.llvm.org/D104950#2842277>, @nikic wrote:

> I figured out what the platform dependent part here is: verify-uselistorder performs shuffles of the use list, and these are based on the std rng infrastructure, so it's prone to be platform dependent. Running the test with `--num-shuffles 2` makes it reproduce on Linux.

Ah, of course. Maybe the default for `--num-shuffles` should be increased?

In D104950#2842318 <https://reviews.llvm.org/D104950#2842318>, @nikic wrote:

> My suspicion here is that this happens whenever an explicit `uselistorder` for the forward declaration is present inside a function. In that case we'll perform the use list order sort on the forward declaration, and rauw it later, breaking the order.

Note that the RAUW will reverse the order at a predictable time, so this is possible to model. But your approach in https://reviews.llvm.org/D104976 seems simpler.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104950



More information about the llvm-commits mailing list