Add capture of "IRUnits" as context for an MLIR Action
authorMehdi Amini <joker.eph@gmail.com>
Mon, 20 Mar 2023 12:40:37 +0000 (13:40 +0100)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 20 Mar 2023 12:40:55 +0000 (13:40 +0100)
commitf406adf134c2f81747bbc653b1399656268fe17a
tree49792cc5de88307e0347ffb125d1cfa5792845ec
parent5736a8a2dab438c8266c79b49d5d5c90f78fdcb4
Add capture of "IRUnits" as context for an MLIR Action

IRUnit is defined as:

  using IRUnit = PointerUnion<Operation *, Region *, Block *, Value>;

The tracing::Action is extended to take an ArrayRef<IRUnit> as context to
describe an Action. It is demonstrated in the "ActionLogging" observer.

Reviewed By: rriddle, Mogball

Differential Revision: https://reviews.llvm.org/D144814
mlir/include/mlir/Debug/Observers/ActionLogging.h
mlir/include/mlir/IR/Action.h
mlir/include/mlir/IR/MLIRContext.h
mlir/include/mlir/IR/Unit.h [new file with mode: 0644]
mlir/lib/Debug/Observers/ActionLogging.cpp
mlir/lib/IR/CMakeLists.txt
mlir/lib/IR/Unit.cpp [new file with mode: 0644]
mlir/lib/Pass/Pass.cpp
mlir/lib/Pass/PassDetail.h
mlir/test/Pass/action-logging.mlir