[all-commits] [llvm/llvm-project] 91b8d9: [mlir:PDLL] Add proper support for operation resul...

River Riddle via All-commits all-commits at lists.llvm.org
Mon May 30 17:43:37 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 91b8d96fd12af6120e2988639455ba35d89a8d3e
      https://github.com/llvm/llvm-project/commit/91b8d96fd12af6120e2988639455ba35d89a8d3e
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-05-30 (Mon, 30 May 2022)

  Changed paths:
    M mlir/docs/PDLL.md
    M mlir/include/mlir/Tools/PDLL/ODS/Context.h
    M mlir/include/mlir/Tools/PDLL/ODS/Dialect.h
    M mlir/include/mlir/Tools/PDLL/ODS/Operation.h
    M mlir/lib/Tools/PDLL/ODS/Context.cpp
    M mlir/lib/Tools/PDLL/ODS/Dialect.cpp
    M mlir/lib/Tools/PDLL/ODS/Operation.cpp
    M mlir/lib/Tools/PDLL/Parser/Parser.cpp
    M mlir/test/mlir-pdll/Parser/expr-failure.pdll

  Log Message:
  -----------
  [mlir:PDLL] Add proper support for operation result type inference

This allows for the results of operations to be inferred in certain contexts,
and matches the support in PDL for result type inference. The main two
initial circumstances are when used as a replacement of another operation,
or when the operation being created implements InferTypeOpInterface.

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


  Commit: 01652d889cf31708bc7ebbf18ef0a4d925112bc7
      https://github.com/llvm/llvm-project/commit/01652d889cf31708bc7ebbf18ef0a4d925112bc7
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-05-30 (Mon, 30 May 2022)

  Changed paths:
    M mlir/lib/Tools/lsp-server-support/CompilationDatabase.cpp
    M mlir/lib/Tools/mlir-pdll-lsp-server/CMakeLists.txt
    M mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp
    M mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
    M mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.h
    A mlir/lib/Tools/mlir-pdll-lsp-server/Protocol.cpp
    A mlir/lib/Tools/mlir-pdll-lsp-server/Protocol.h
    A mlir/test/mlir-pdll-lsp-server/view-output.test
    M mlir/utils/vscode/package.json
    A mlir/utils/vscode/src/PDLL/commands/viewOutput.ts
    A mlir/utils/vscode/src/PDLL/pdll.ts
    A mlir/utils/vscode/src/command.ts
    M mlir/utils/vscode/src/extension.ts
    M mlir/utils/vscode/src/mlirContext.ts

  Log Message:
  -----------
  [mlir:PDLL-LSP] Add a custom LSP command for viewing the output of PDLL

This commit adds a new PDLL specific LSP command, pdll.viewOutput, that
allows for viewing the intermediate outputs of a given PDLL file. The available
intermediate forms currently mirror those in mlir-pdll, namely: AST, MLIR, CPP.
This is extremely useful for a developer of PDLL, as it simplifies various testing,
and is also quite useful for users as they can easily view what is actually being
generated for their PDLL files.

This new command is added to the vscode client, and is available in the right
client context menu of PDLL files, or via the vscode command palette.

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


  Commit: 0429472efe6a894a6554d75fd77baeb9cdb32dd5
      https://github.com/llvm/llvm-project/commit/0429472efe6a894a6554d75fd77baeb9cdb32dd5
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-05-30 (Mon, 30 May 2022)

  Changed paths:
    M mlir/lib/Tools/PDLL/Parser/Parser.cpp
    M mlir/test/mlir-pdll-lsp-server/include/included.td
    M mlir/test/mlir-pdll-lsp-server/signature-help.test

  Log Message:
  -----------
  [mlir:PDLL] Fix signature help for operation operands

We were currently only completing on the first operand because
the completion check was outside of the parse loop.

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


  Commit: 1c2edb026ed67ddbb30ebe3e2d2f4f17a882a881
      https://github.com/llvm/llvm-project/commit/1c2edb026ed67ddbb30ebe3e2d2f4f17a882a881
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-05-30 (Mon, 30 May 2022)

  Changed paths:
    M mlir/docs/PDLL.md
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Tools/PDLL/AST/Nodes.h
    M mlir/include/mlir/Tools/PDLL/AST/Types.h
    M mlir/include/mlir/Tools/PDLL/ODS/Context.h
    M mlir/include/mlir/Tools/PDLL/ODS/Dialect.h
    M mlir/include/mlir/Tools/PDLL/ODS/Operation.h
    M mlir/lib/Tools/PDLL/AST/Nodes.cpp
    M mlir/lib/Tools/PDLL/AST/TypeDetail.h
    M mlir/lib/Tools/PDLL/AST/Types.cpp
    M mlir/lib/Tools/PDLL/CodeGen/CPPGen.cpp
    M mlir/lib/Tools/PDLL/CodeGen/MLIRGen.cpp
    M mlir/lib/Tools/PDLL/ODS/Context.cpp
    M mlir/lib/Tools/PDLL/ODS/Dialect.cpp
    M mlir/lib/Tools/PDLL/ODS/Operation.cpp
    M mlir/lib/Tools/PDLL/Parser/Parser.cpp
    M mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
    M mlir/test/mlir-pdll/CodeGen/CPP/general.pdll

  Log Message:
  -----------
  [mlir:PDLL] Rework the C++ generation of native Constraint/Rewrite arguments and results

The current translation uses the old "ugly"/"raw" form which used PDLValue for the arguments
and results. This commit updates the C++ generation to use the recently added sugar that
allows for directly using the desired types for the arguments and result of PDL functions.
In addition, this commit also properly imports the C++ class for ODS operations, constraints,
and interfaces. This allows for a much more convienent C++ API than previously granted
with the raw/low-level types.

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


Compare: https://github.com/llvm/llvm-project/compare/2cadf84fc817...1c2edb026ed6


More information about the All-commits mailing list