Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/lib/Pass/TestPassManager.cpp
//===- TestPassManager.cpp - Test pass manager functionality --------------===// | //===- TestPassManager.cpp - Test pass manager functionality --------------===// | ||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#include "mlir/IR/Function.h" | #include "mlir/IR/Function.h" | ||||
#include "mlir/Pass/Pass.h" | #include "mlir/Pass/Pass.h" | ||||
#include "mlir/Pass/PassManager.h" | #include "mlir/Pass/PassManager.h" | ||||
using namespace mlir; | using namespace mlir; | ||||
namespace { | namespace { | ||||
struct TestModulePass : public ModulePass<TestModulePass> { | struct TestModulePass : public OperationPass<TestModulePass, ModuleOp> { | ||||
void runOnModule() final {} | void runOnOperation() final {} | ||||
}; | }; | ||||
struct TestFunctionPass : public FunctionPass<TestFunctionPass> { | struct TestFunctionPass : public FunctionPass<TestFunctionPass> { | ||||
void runOnFunction() final {} | void runOnFunction() final {} | ||||
}; | }; | ||||
class TestOptionsPass : public FunctionPass<TestOptionsPass> { | class TestOptionsPass : public FunctionPass<TestOptionsPass> { | ||||
public: | public: | ||||
struct Options : public PassPipelineOptions<Options> { | struct Options : public PassPipelineOptions<Options> { | ||||
ListOption<int> listOption{*this, "list", | ListOption<int> listOption{*this, "list", | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |