//===-- PassBase.td - Base pass definition file ------------*- tablegen -*-===// // // Part of the LLVM Project, 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 // //===----------------------------------------------------------------------===// // // This file contains definitions for defining pass registration and other // mechanisms. // //===----------------------------------------------------------------------===// #ifndef MLIR_PASS_PASSBASE #define MLIR_PASS_PASSBASE //===----------------------------------------------------------------------===// // Options //===----------------------------------------------------------------------===// class Option { // The name for the C++ option variable. string cppName = varName; // The command line argument to use for this option. string argument = arg; // The C++ type of the option. string type = valueType; // The default value of the option. "" corresponds to no default. string defaultValue = default; // A description for this option. string description = desc; // A set of additional flags to pass along to the option constructor. string additionalOptFlags = additionalFlags; } class ListOption : Option {} //===----------------------------------------------------------------------===// // Statistics //===----------------------------------------------------------------------===// class Statistic { // The C++ variable name for the statistic. string cppName = varName; // The displayed name of the statistic, similar to the argument of an option. string name = statName; // The description of the statistic. string description = desc; } //===----------------------------------------------------------------------===// // Pass //===----------------------------------------------------------------------===// class PassBase { // The command line argument of the pass. string argument = passArg; // The C++ base class for the pass. string baseClass = base; // A short 1-line summary of the pass. string summary = ""; // A human readable description of the pass. string description = ""; // A C++ constructor call to create an instance of this pass. code constructor = [{}]; // A list of dialects this pass may produce entities in. list dependentDialects = []; // A set of options provided by this pass. list