llvm/mlir/test/lib/Interfaces/LoopLikeInterface/TestBlockInLoop.cpp

//===- TestBlockInLoop.cpp - Pass to test mlir::blockIsInLoop -------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/Interfaces/LoopLikeInterface.h"
#include "mlir/Pass/Pass.h"
#include "llvm/Support/raw_ostream.h"

usingnamespacemlir;

namespace {
/// This is a test pass that tests Blocks's isInLoop method by checking if each
/// block in a function is in a loop and outputing if it is
struct IsInLoopPass
    : public PassWrapper<IsInLoopPass, OperationPass<func::FuncOp>> {};

} // namespace

namespace mlir {
void registerLoopLikeInterfaceTestPasses() {}
} // namespace mlir