24#include "mlir/Dialect/SCF/IR/SCF.h"
25#include "mlir/Dialect/SCF/Utils/Utils.h"
26#include "mlir/Pass/Pass.h"
27#include "llvm/ADT/SmallVector.h"
30#define GEN_PASS_DEF_AIEUNROLLRUNTIMESEQUENCELOOPS
31#include "aie/Dialect/AIEX/Transforms/AIEXPasses.h.inc"
41struct AIEUnrollRuntimeSequenceLoopsPass
42 : xilinx::AIEX::impl::AIEUnrollRuntimeSequenceLoopsBase<
43 AIEUnrollRuntimeSequenceLoopsPass> {
45 void runOnOperation()
override {
46 DeviceOp device = getOperation();
48 device.walk([&](RuntimeSequenceOp seq) {
56 SmallVector<scf::ForOp> loops;
57 seq.walk([&](scf::ForOp forOp) {
58 if (forOp.getStaticTripCount().has_value())
59 loops.push_back(forOp);
61 for (scf::ForOp forOp : loops)
62 (void)loopUnrollFull(forOp);
69std::unique_ptr<mlir::OperationPass<AIE::DeviceOp>>
71 return std::make_unique<AIEUnrollRuntimeSequenceLoopsPass>();
std::unique_ptr< mlir::OperationPass< AIE::DeviceOp > > createAIEUnrollRuntimeSequenceLoopsPass()