//===- TestDominance.cpp - Test dominance construction and information //-------===// // // 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 test passes for constructing and resolving dominance // information. // //===----------------------------------------------------------------------===// #include "mlir/IR/Dominance.h" #include "mlir/IR/SymbolTable.h" #include "mlir/Pass/Pass.h" usingnamespacemlir; /// Overloaded helper to call the right function based on whether we are testing /// dominance or post-dominance. static bool dominatesOrPostDominates(DominanceInfo &dominanceInfo, Block *a, Block *b) { … } static bool dominatesOrPostDominates(PostDominanceInfo &dominanceInfo, Block *a, Block *b) { … } namespace { /// Helper class to print dominance information. class DominanceTest { … }; struct TestDominancePass : public PassWrapper<TestDominancePass, InterfacePass<SymbolOpInterface>> { … }; } // namespace namespace mlir { namespace test { void registerTestDominancePass() { … } } // namespace test } // namespace mlir