15 #ifndef CIRCT_DIALECT_ESI_APPID_H
16 #define CIRCT_DIALECT_ESI_APPID_H
21 #include "mlir/IR/Operation.h"
22 #include "llvm/ADT/DenseMap.h"
49 function_ref<
void(AppIDPathAttr, ArrayRef<Operation *>)> fn)
const;
52 function_ref<
void(AppIDPathAttr, ArrayRef<Operation *>)> fn)
const;
57 AppIDAttr appid, Location loc)
const;
62 walk(hw::HWModuleLike top, hw::HWModuleLike current,
63 SmallVectorImpl<AppIDAttr> &pathStack,
64 SmallVectorImpl<Operation *> &opStack,
65 function_ref<
void(AppIDPathAttr, ArrayRef<Operation *>)> fn)
const;
73 FailureOr<const ModuleAppIDs *>
buildIndexFor(hw::HWModuleLike modToProcess);
An index for resolving AppIDPaths to dynamic instances.
DenseMap< hw::HWModuleLike, ModuleAppIDs * > containerAppIDs
FailureOr< ArrayAttr > getAppIDPathAttr(hw::HWModuleLike fromMod, AppIDAttr appid, Location loc) const
Return an array of InnerNameRefAttrs representing the relative path to 'appid' from 'fromMod'.
LogicalResult walk(hw::HWModuleLike top, function_ref< void(AppIDPathAttr, ArrayRef< Operation * >)> fn) const
Walk the AppID hierarchy rooted at the specified module.
AppIDIndex(Operation *mlirTop)
FailureOr< const ModuleAppIDs * > buildIndexFor(hw::HWModuleLike modToProcess)
Construct the index for a module.
LogicalResult walk(hw::HWModuleLike top, hw::HWModuleLike current, SmallVectorImpl< AppIDAttr > &pathStack, SmallVectorImpl< Operation * > &opStack, function_ref< void(AppIDPathAttr, ArrayRef< Operation * >)> fn) const
Walk the AppID hierarchy rooted at the specified module.
ArrayAttr getChildAppIDsOf(hw::HWModuleLike) const
hw::HWSymbolCache symCache
LogicalResult walk(StringRef top, function_ref< void(AppIDPathAttr, ArrayRef< Operation * >)> fn) const
This stores lookup tables to make manipulating and working with the IR more efficient.
AppIDAttr getAppID(Operation *op)
Get the AppID of a particular operation.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.