bjorn3 opened PR #2527 from serialize_ir
to main
:
This is necessary to embed clif ir in object files for external tools to consume without unreasonable overhead. It would probably also make it much quicker to serialize clif ir to files than writing it in textual format. This would be useful during development of cg_clif.
bjorn3 edited PR #2527 from serialize_ir
to main
:
This is necessary to embed clif ir in object files for external tools to consume without unreasonable overhead. It would probably also make it much quicker to serialize clif ir to files than writing it in textual format. This would be useful during development of cg_clif. (cc https://github.com/bjorn3/rustc_codegen_cranelift/issues/710)
bjorn3 updated PR #2527 from serialize_ir
to main
:
This is necessary to embed clif ir in object files for external tools to consume without unreasonable overhead. It would probably also make it much quicker to serialize clif ir to files than writing it in textual format. This would be useful during development of cg_clif. (cc https://github.com/bjorn3/rustc_codegen_cranelift/issues/710)
bjorn3 updated PR #2527 from serialize_ir
to main
.
bjorn3 updated PR #2527 from serialize_ir
to main
.
bjorn3 updated PR #2527 from serialize_ir
to main
.
cfallin submitted PR Review.
cfallin submitted PR Review.
cfallin created PR Review Comment:
Can you say a bit more about why we need a custom Serialize/Deserialize for
Layout
? This sort of code can be somewhat error-prone, especially when we update it later (with footguns such as silently forgetting to include a field we have added). At the very least, if we have to implement it this way, we should document the serialized sequence (it looks like a series of blocknum, inst_count, [insts] elements?) and add warning comments inLayout
to note that only certain data is serialized.
bjorn3 submitted PR Review.
bjorn3 created PR Review Comment:
Layout
uses linked lists of blocks and instructions. In addition each block and inst has a sequence number that monotonically increases. This wastes a lot of space. I replaced it with a list of blocks and block sizes followed by a list of instructions.
cfallin submitted PR Review.
cfallin created PR Review Comment:
OK, that's sort of what I expected -- makes sense. Could you add a detailed doc comment that describes the equivalent serialized data structure (list of elements of these types ...)?
bjorn3 updated PR #2527 from serialize_ir
to main
.
bjorn3 submitted PR Review.
bjorn3 created PR Review Comment:
Done
bjorn3 updated PR #2527 from serialize_ir
to main
.
bjorn3 updated PR #2527 from serialize_ir
to main
.
cfallin submitted PR Review.
bjorn3 updated PR #2527 from serialize_ir
to main
.
bjorn3 updated PR #2527 from serialize_ir
to main
.
bjorn3 updated PR #2527 from serialize_ir
to main
.
bjorn3 updated PR #2527 from serialize_ir
to main
.
bjorn3 updated PR #2527 from serialize_ir
to main
.
cfallin merged PR #2527.
Last updated: Nov 22 2024 at 17:03 UTC