MLIR-AIE
1.4.6.dev
include
aie
Dialect
AIE
Transforms
AIEPoolLocks.h
Go to the documentation of this file.
1
//===- AIEPoolLocks.h -------------------------------------------*- C++ -*-===//
2
//
3
// Copyright (C) 2026 Advanced Micro Devices, Inc.
4
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5
//
6
//===----------------------------------------------------------------------===//
7
8
#ifndef AIE_DIALECT_AIE_TRANSFORMS_AIEPOOLLOCKS_H
9
#define AIE_DIALECT_AIE_TRANSFORMS_AIEPOOLLOCKS_H
10
11
#include "
aie/Dialect/AIE/IR/AIEDialect.h
"
12
#include "
aie/Dialect/AIEX/IR/AIEXDialect.h
"
13
14
#include "llvm/ADT/DenseSet.h"
15
#include "llvm/ADT/SmallVector.h"
16
#include "llvm/ADT/StringMap.h"
17
18
namespace
xilinx::AIE
{
19
20
/// Which of a device's objectFIFO pools get locks, read once from its
21
/// endpoints and its `aiex.dma_channel_reset_for` ops.
22
class
PoolLocks
{
23
public
:
24
explicit
PoolLocks
(DeviceOp device);
25
26
/// Whether `pool` gets locks. One with synchronization disabled does not,
27
/// nor one that starts full, is never refilled and is not re-armed each
28
/// launch: it holds constants its readers have nothing to wait for.
29
bool
needsLocks
(ObjectFifoPoolOp pool)
const
;
30
31
/// The `aiex.dma_channel_reset_for` ops re-arming each fifo, by fifo name.
32
const
llvm::StringMap<llvm::SmallVector<AIEX::DmaChannelResetForOp>> &
33
rearms
()
const
{
34
return
rearmsByFifo;
35
}
36
37
private
:
38
llvm::DenseSet<mlir::Operation *> filled;
39
llvm::StringMap<llvm::SmallVector<AIEX::DmaChannelResetForOp>> rearmsByFifo;
40
};
41
42
}
// namespace xilinx::AIE
43
44
#endif
// AIE_DIALECT_AIE_TRANSFORMS_AIEPOOLLOCKS_H
AIEDialect.h
AIEXDialect.h
xilinx::AIE::PoolLocks::needsLocks
bool needsLocks(ObjectFifoPoolOp pool) const
Whether pool gets locks.
Definition
AIEPoolLocks.cpp:33
xilinx::AIE::PoolLocks::PoolLocks
PoolLocks(DeviceOp device)
Definition
AIEPoolLocks.cpp:14
xilinx::AIE::PoolLocks::rearms
const llvm::StringMap< llvm::SmallVector< AIEX::DmaChannelResetForOp > > & rearms() const
The aiex.dma_channel_reset_for ops re-arming each fifo, by fifo name.
Definition
AIEPoolLocks.h:33
xilinx::AIE
Definition
AIEToConfiguration.h:19
Generated by
1.15.0