[PATCH] D127729: [Bitcode] Support expanding constant expressions into instructions

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 06:55:07 PDT 2022


dexonsmith added a comment.

This seems challenging indeed. (To clarify, there’s never a need to worry about use-list-order when an upgrade is happening, since use-lists can be dropped when there’s a mismatch, but since all constants have changed materialization order that affects the non-upgrade case too.)

The key is to understand the order that constant expressions will be created, and therefore what the “natural” use-list order would be. What might help to debug this would be to sort use-lists before serialization, and dump them after deserialization, to track the mutations. Once you understand what’s happening it should be easier to add/change the logic to predict the order.

It might be okay to add an extra pass to serialization (only when use-lists are being written), as long as it it’s still relatively cheap. Not sure if that’s helpful or not.

BTW, it’s not easy for me to dig in myself for the next couple of months (don’t have ready access to a development machine) but happy to iterate on ideas / think things through.


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

https://reviews.llvm.org/D127729



More information about the llvm-commits mailing list