//===- TestPrintDefUse.cpp - Passes to illustrate the IR def-use chains ---===// // // 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/Bytecode/BytecodeWriter.h" #include "mlir/Bytecode/Encoding.h" #include "mlir/IR/BuiltinOps.h" #include "mlir/IR/OwningOpRef.h" #include "mlir/Parser/Parser.h" #include "mlir/Pass/Pass.h" #include <numeric> #include <random> usingnamespacemlir; namespace { /// This pass tests that: /// 1) we can shuffle use-lists correctly; /// 2) use-list orders are preserved after a roundtrip to bytecode. class TestPreserveUseListOrders : public PassWrapper<TestPreserveUseListOrders, OperationPass<ModuleOp>> { … }; } // namespace namespace mlir { void registerTestPreserveUseListOrders() { … } } // namespace mlir