IR serialization would be nice to have both for prototyping and debugging purposes. Current spew is informative and usable in existing tools but does not fully capture available information.
Since this will probably end up getting used for a test suite, some thoughts on formatting requirements: - Format should be somewhat human readable/writable - Code should be clearly assigned to basic blocks - There should be room for hints or attributes of reasonable types on blocks and ops - Easy to parse, preferably with existing libraries The generality required here seems to suggest something like JSON or YAML. These are a little verbose for code though (YAML less than JSON) -- one could want something a little closer to assembly code. Thoughts? CCing potentially interested parties.
It would be good to know exactly which components of the IR have to be serialized. The C1 spew mostly just takes arbitrary strings so maybe we could fit in there.
I like the requirements. For format, I'd prefer JSON over YAML simply based on availability and familiarity. And I'm totally fine with a custom asm-like syntax.
It doesn't seem worthwhile to spend time on this now -- the major optimizations are in-tree already and adding all this machinery for minor stuff seems like a colossal waste of time.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.