[all-commits] [llvm/llvm-project] 6bc767: [mlir] Add a DialectAsmParser::getChecked method

River Riddle via All-commits all-commits at lists.llvm.org
Thu Mar 4 12:00:50 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6bc767cd071ccdb41b5532f7d9cae22999e0fac4
      https://github.com/llvm/llvm-project/commit/6bc767cd071ccdb41b5532f7d9cae22999e0fac4
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M mlir/include/mlir/IR/DialectImplementation.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp
    M mlir/lib/Dialect/Quant/IR/TypeParser.cpp
    M mlir/lib/Parser/DialectSymbolParser.cpp

  Log Message:
  -----------
  [mlir] Add a DialectAsmParser::getChecked method

This function simplifies calling the getChecked methods on Attributes and Types from within the parser, and removes any need to use `getEncodedSourceLocation` for these methods (by using an SMLoc instead). This is much more efficient than using an mlir::Location, as the encoding process to produce an mlir::Location is inefficient and undesirable for parsing (locations used during parsing should not persist afterwards unless otherwise necessary).

Differential Revision: https://reviews.llvm.org/D97900




More information about the All-commits mailing list