1//===- StandaloneDialect.td - Standalone dialect -----------*- tablegen -*-===// 2// 3// This file is licensed under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9#ifndef STANDALONE_DIALECT 10#define STANDALONE_DIALECT 11 12include "mlir/IR/OpBase.td" 13 14//===----------------------------------------------------------------------===// 15// Standalone dialect definition. 16//===----------------------------------------------------------------------===// 17 18def Standalone_Dialect : Dialect { 19 let name = "standalone"; 20 let summary = "A standalone out-of-tree MLIR dialect."; 21 let description = [{ 22 This dialect is an example of an out-of-tree MLIR dialect designed to 23 illustrate the basic setup required to develop MLIR-based tools without 24 working inside of the LLVM source tree. 25 }]; 26 let cppNamespace = "::mlir::standalone"; 27 28 let useDefaultTypePrinterParser = 1; 29 let extraClassDeclaration = [{ 30 void registerTypes(); 31 }]; 32} 33 34//===----------------------------------------------------------------------===// 35// Base standalone operation definition. 36//===----------------------------------------------------------------------===// 37 38class Standalone_Op<string mnemonic, list<Trait> traits = []> : 39 Op<Standalone_Dialect, mnemonic, traits>; 40 41#endif // STANDALONE_DIALECT 42