[LLVMdev] Continuing PR5680: preserve order of use lists in bitcode
Duncan P. N. Exon Smith
duncan at exonsmith.com
Tue Jul 8 16:29:40 PDT 2014
I'm looking to tackle PR5680 [1]. The primary goal is to prevent
behaviour changes in passes that depend on the order of use lists when
serializing/deserializing the IR to a bitcode file (.bc) between passes.
Here's a quick high-level summary:
- When writing bitcode, calculate what the use list order will be
after reading the bitcode. (Assumption: the order is predictable.)
- Write a use-list-order-diff in a new (optional) section in the
bitcode.
- When reading bitcode, apply the use-list-order-diff to restore the
original use list order.
A secondary goal is to have the same feature for assembly files (.ll).
How to represent the use-list-order(-diff?) in assembly is a little
unclear, so I'll send an RFC when I get to that point.
My plan is to pick up where Chad's commits (e.g., r146078, r146090,
r146442, and r146531) left off. If someone has a major concern with the
direction, let me know.
[1]: http://llvm.org/bugs/show_bug.cgi?id=5680
More information about the llvm-dev
mailing list