[mlir] Refactor the Parser library in preparation for an MLIR binary format
authorRiver Riddle <riddleriver@gmail.com>
Sun, 10 Jul 2022 08:00:21 +0000 (01:00 -0700)
committerRiver Riddle <riddleriver@gmail.com>
Mon, 25 Jul 2022 23:33:01 +0000 (16:33 -0700)
commitc60b897d22b2feab3282c4fc2b390bc87560c7de
tree6638eefb32f4f9966bd382349f28a166d49812c7
parent5ae0472694f5d53c0b889a48dc042961291d2341
[mlir] Refactor the Parser library in preparation for an MLIR binary format

The current Parser library is solely focused on providing API for
the textual MLIR format, but MLIR will soon also provide a binary
format. This commit renames the current Parser library to AsmParser to
better correspond to what the library is actually intended for. A new
Parser library is added which will act as a unified parser interface
between both text and binary formats. Most parser clients are
unaffected, given that the unified interface is essentially the same as
the current interface. Only clients that rely on utilizing the
AsmParserState, or those that want to parse Attributes/Types need to be
updated to point to the AsmParser library.

Differential Revision: https://reviews.llvm.org/D129605
33 files changed:
mlir/include/mlir/AsmParser/AsmParser.h [new file with mode: 0644]
mlir/include/mlir/AsmParser/AsmParserState.h [moved from mlir/include/mlir/Parser/AsmParserState.h with 98% similarity]
mlir/include/mlir/AsmParser/CodeComplete.h [moved from mlir/include/mlir/Parser/CodeComplete.h with 96% similarity]
mlir/include/mlir/IR/AsmState.h
mlir/include/mlir/Parser/Parser.h
mlir/lib/AsmParser/AffineParser.cpp [moved from mlir/lib/Parser/AffineParser.cpp with 100% similarity]
mlir/lib/AsmParser/AsmParserImpl.h [moved from mlir/lib/Parser/AsmParserImpl.h with 99% similarity]
mlir/lib/AsmParser/AsmParserState.cpp [moved from mlir/lib/Parser/AsmParserState.cpp with 99% similarity]
mlir/lib/AsmParser/AttributeParser.cpp [moved from mlir/lib/Parser/AttributeParser.cpp with 99% similarity]
mlir/lib/AsmParser/CMakeLists.txt [new file with mode: 0644]
mlir/lib/AsmParser/DialectSymbolParser.cpp [moved from mlir/lib/Parser/DialectSymbolParser.cpp with 100% similarity]
mlir/lib/AsmParser/Lexer.cpp [moved from mlir/lib/Parser/Lexer.cpp with 99% similarity]
mlir/lib/AsmParser/Lexer.h [moved from mlir/lib/Parser/Lexer.h with 94% similarity]
mlir/lib/AsmParser/LocationParser.cpp [moved from mlir/lib/Parser/LocationParser.cpp with 100% similarity]
mlir/lib/AsmParser/Parser.cpp [new file with mode: 0644]
mlir/lib/AsmParser/Parser.h [moved from mlir/lib/Parser/Parser.h with 99% similarity]
mlir/lib/AsmParser/ParserState.h [moved from mlir/lib/Parser/ParserState.h with 94% similarity]
mlir/lib/AsmParser/Token.cpp [moved from mlir/lib/Parser/Token.cpp with 100% similarity]
mlir/lib/AsmParser/Token.h [moved from mlir/lib/Parser/Token.h with 100% similarity]
mlir/lib/AsmParser/TokenKinds.def [moved from mlir/lib/Parser/TokenKinds.def with 100% similarity]
mlir/lib/AsmParser/TypeParser.cpp [moved from mlir/lib/Parser/TypeParser.cpp with 100% similarity]
mlir/lib/CAPI/IR/IR.cpp
mlir/lib/CMakeLists.txt
mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
mlir/lib/Parser/CMakeLists.txt
mlir/lib/Parser/Parser.cpp
mlir/lib/Tools/PDLL/CodeGen/MLIRGen.cpp
mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
mlir/tools/mlir-parser-fuzzer/mlir-parser-fuzzer.cpp
mlir/unittests/Dialect/Affine/Analysis/AffineStructuresParser.cpp