HomePhabricator

Simplify the way spirv::StructTypes are parsed.

Authored by mravishankar on Sep 23 2019, 12:52 PM.

Description

Simplify the way spirv::StructTypes are parsed.

The existing logic to parse spirv::StructTypes is very brittle. This
change simplifies the parsing logic a lot. The simplification also
allows for memberdecorations to be separated by commas instead of
spaces (which was an artifact of the existing parsing logic). The
change also needs a modification to mlir::parseType to return the
number of chars parsed. Adding a new parseType method to do so.

Also allow specification of spirv::StructType with no members.

PiperOrigin-RevId: 270739672

Event Timeline

A. Unique TensorFlower <gardener@tensorflow.org> committed rG98d1d3fc437f: Simplify the way spirv::StructTypes are parsed. (authored by mravishankar).Sep 23 2019, 12:53 PM