49 lines
1.8 KiB
TableGen
49 lines
1.8 KiB
TableGen
//===-- Passes.td - MLIR Reduce 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 of the passes for the MLIR Reduce Tool.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef MLIR_REDUCER_PASSES
|
|
#define MLIR_REDUCER_PASSES
|
|
|
|
include "mlir/Pass/PassBase.td"
|
|
|
|
def CommonReductionPassOptions {
|
|
list<Option> options = [
|
|
Option<"testerName", "test", "std::string", /* default */"",
|
|
"The location of the tester which tests the file interestingness">,
|
|
ListOption<"testerArgs", "test-arg", "std::string",
|
|
"arguments of the tester">,
|
|
];
|
|
}
|
|
|
|
def ReductionTreePass : Pass<"reduction-tree"> {
|
|
let summary = "Reduce the input with reduction-tree algorithm";
|
|
|
|
let options = [
|
|
Option<"traversalModeId", "traversal-mode", "unsigned",
|
|
/* default */"0",
|
|
"The graph traversal mode, the default is single-path mode">,
|
|
] # CommonReductionPassOptions.options;
|
|
}
|
|
|
|
def OptReductionPass : Pass<"opt-reduction-pass"> {
|
|
let summary = "A wrapper pass that reduces the file with optimization passes";
|
|
|
|
let options = [
|
|
Option<"optPass", "opt-pass", "std::string", /* default */"",
|
|
"The optimization passes used for reduction, e.g., symbol-dce">,
|
|
Option<"optPassFile", "opt-pass-file", "std::string", /* default */"",
|
|
"The file path containing the optimization pipeline definition">,
|
|
] # CommonReductionPassOptions.options;
|
|
}
|
|
|
|
#endif // MLIR_REDUCER_PASSES
|