aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-09-26 19:08:01 +0100
committerYann Herklotz <git@yannherklotz.com>2022-09-26 19:08:48 +0100
commit0034f32d6d85d7f21cf04c82083860cdb2fe1ddb (patch)
treef37f65190acd6040a262cdb7d2dbf6e2b17556f5 /include
parentb018c1ef00eade87c9efbf48cc2e3466877ea79d (diff)
downloadgsa-mlir-master.tar.gz
gsa-mlir-master.zip
Update MLIR files and include LLVM directoryHEADmaster
Diffstat (limited to 'include')
-rw-r--r--include/Standalone-c/Dialects.h24
-rw-r--r--include/Standalone/StandaloneDialect.td2
-rw-r--r--include/Standalone/StandaloneOps.h1
-rw-r--r--include/Standalone/StandaloneOps.td5
4 files changed, 29 insertions, 3 deletions
diff --git a/include/Standalone-c/Dialects.h b/include/Standalone-c/Dialects.h
new file mode 100644
index 0000000..b3e4775
--- /dev/null
+++ b/include/Standalone-c/Dialects.h
@@ -0,0 +1,24 @@
+//===- Dialects.h - CAPI for dialects -----------------------------*- C -*-===//
+//
+// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef STANDALONE_C_DIALECTS_H
+#define STANDALONE_C_DIALECTS_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Standalone, standalone);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // STANDALONE_C_DIALECTS_H
diff --git a/include/Standalone/StandaloneDialect.td b/include/Standalone/StandaloneDialect.td
index a7fd789..1588601 100644
--- a/include/Standalone/StandaloneDialect.td
+++ b/include/Standalone/StandaloneDialect.td
@@ -30,7 +30,7 @@ def Standalone_Dialect : Dialect {
// Base standalone operation definition.
//===----------------------------------------------------------------------===//
-class Standalone_Op<string mnemonic, list<OpTrait> traits = []> :
+class Standalone_Op<string mnemonic, list<Trait> traits = []> :
Op<Standalone_Dialect, mnemonic, traits>;
#endif // STANDALONE_DIALECT
diff --git a/include/Standalone/StandaloneOps.h b/include/Standalone/StandaloneOps.h
index a56c286..a9006e0 100644
--- a/include/Standalone/StandaloneOps.h
+++ b/include/Standalone/StandaloneOps.h
@@ -12,6 +12,7 @@
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/OpDefinition.h"
+#include "mlir/Interfaces/InferTypeOpInterface.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#define GET_OP_CLASSES
diff --git a/include/Standalone/StandaloneOps.td b/include/Standalone/StandaloneOps.td
index f6ba7a6..1098dc5 100644
--- a/include/Standalone/StandaloneOps.td
+++ b/include/Standalone/StandaloneOps.td
@@ -9,7 +9,8 @@
#ifndef STANDALONE_OPS
#define STANDALONE_OPS
-include "StandaloneDialect.td"
+include "Standalone/StandaloneDialect.td"
+include "mlir/Interfaces/InferTypeOpInterface.td"
include "mlir/Interfaces/SideEffectInterfaces.td"
def Standalone_FooOp : Standalone_Op<"foo", [NoSideEffect,
@@ -25,7 +26,7 @@ def Standalone_FooOp : Standalone_Op<"foo", [NoSideEffect,
Example:
```mlir
- %0 = constant 2 : i32
+ %0 = arith.constant 2 : i32
// Apply the foo operation to %0
%1 = standalone.foo %0 : i32
```