From 682b9b2b83ec72f77a5920285e34cad5b563de58 Mon Sep 17 00:00:00 2001 From: Lucy Fox Date: Thu, 14 Nov 2019 17:54:10 -0800 Subject: [PATCH] Expand on operation definition to clarify the difference between operation and op. PiperOrigin-RevId: 280555742 --- mlir/g3doc/Glossary.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mlir/g3doc/Glossary.md b/mlir/g3doc/Glossary.md index a0752c3..542d375 100644 --- a/mlir/g3doc/Glossary.md +++ b/mlir/g3doc/Glossary.md @@ -120,6 +120,12 @@ An operation can have zero or more [regions](#region). Note that this creates a nested IR structure, as regions consist of blocks, which in turn, consist of a list of operations. +In MLIR, there are two main classes related to operations: `Operation` and `Op`. +Operation is the actual opaque instance of the operation, and represents the +general API into an operation instance. An `Op` is the base class of a derived +operation, like `ConstantOp`, and acts as smart pointer wrapper around a +`Operation*` + #### [Region](LangRef.md#regions) A [CFG](https://en.wikipedia.org/wiki/Control-flow_graph) of MLIR -- 2.7.4