[PATCH] D55243: [mir] Serialize DILocation inline when not possible to use a metadata reference
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 6 14:33:43 PST 2018
probinson added inline comments.
================
Comment at: lib/CodeGen/MIRParser/MIParser.cpp:1706
+
+ if (expectAndConsume(MIToken::lparen))
+ return true;
----------------
dsanders wrote:
> aprantl wrote:
> > I assume because of all the MIToken references there is no reasonable way that this code could be shared with LLParser?
> I think a few small fragments are potentially sharable but the cost of doing so is going to outweigh the benefit. We'd have to find a way to keep the MIR lexer/parser in sync with LLParser's and be careful to avoid everything LLParser does with Instructions and other LLVM-IR level structures. It's probably best to keep the LLVM-IR and MIR parsers separate.
Sadly true. Bitcode Reader has metadata handling split out, but Bitcode Writer and the IR reader/writer all have IR and metadata handling mashed together. They'd need to be split apart first.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55243/new/
https://reviews.llvm.org/D55243
More information about the llvm-commits
mailing list