[PATCH] AsmParser: Save and restore parsing state for types so that types can be parsed correctly in a separate standalone parsing stage

Alex L via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 14:38:39 PDT 2015


Thanks, this got committed in r 245740.

2015-08-21 12:28 GMT-07:00 Duncan P. N. Exon Smith <dexonsmith at apple.com>:

>
> > On 2015-Aug-20, at 17:14, Alex L <arphaman at gmail.com> wrote:
> >
> > Hi,
> >
> > This patch extends the 'SlotMapping' and includes mappings for named and
> > numbered types in it. The LLParser is extended accordingly to fill out
> those
> > mappings at the end of module parsing.
> >
> > This information is useful when we want to parse standalone constant
> values
> > at a later stage using the 'parseConstantValue' method. The constant
> values
> > can be constant expressions, which can contain references to types. In
> order
> > to parse such constant values, we have to restore the internal named and
> > numbered mappings for the types in LLParser, otherwise the parser will
> report
> > a parsing error. Therefore, this patch also introduces a new method
> called
> > 'restoreParsingState' to LLParser, which uses the slot mappings to
> restore
> > some of its internal parsing state.
> >
> > This patch is required to serialize constant value pointers in the
> machine
> > memory operands for the MIR format.
> >
> > Cheers,
> > Alex
> > <0001-AsmParser-Save-and-restore-the-parsing-state-of-type.patch>
>
> LGTM!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150821/7c4d0325/attachment.html>


More information about the llvm-commits mailing list