[LLVMdev] RFC: Machine Level IR text-based serialization format
Krzysztof Parzyszek
kparzysz at codeaurora.org
Wed Apr 29 06:40:22 PDT 2015
On 4/28/2015 7:13 PM, Alex L wrote:
>
>
> 2015-04-28 16:26 GMT-07:00 Matthias Braun <matze at braunis.de
> <mailto:matze at braunis.de>>:
>
> For that use case it is worth keeping the following things in mind:
> - Please try to keep the output of the various dump functions, esp.
> MachineInstr::dump(), MachineOperand::dump(),
> MachineBasicBlock::dump() as close as possible to the format you use
> for serializing.
> [...]
>
> Ideally the new syntax would replace the existing print/dump syntax. The
> new syntax will lead to certain missing information when
> this information can be inferred (e.g. the TiedTo and IsEarlyClobber
> attributes for register operands that I mentioned earlier in this thread),
> so maybe we could have some sort of verbose dumping option where
> absolutely everything is dumped.
I think that the new syntax is less readable than the current format of
the "dump" functions, and in the long term it would be better to have
something more human-friendly. However, using YAML has the advantage
that it's easier to parse it than the direct output of "dump" and so it
will take less time to implement a YAML-based solution. My concern is
that you may run out of time to complete this and the file format is not
the most important thing in this project. Getting it to work, if only
as a proof of concept, would be very helpful to everyone. Coming up
with a fancier grammar and implementing a parser for it could be done
later on top of the initial implementation.
-Krzysztof
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the llvm-dev
mailing list