8#ifndef AIE_TRANSFORMS_AIESTRUCTURALRANK_H
9#define AIE_TRANSFORMS_AIESTRUCTURALRANK_H
13#include "llvm/ADT/DenseMap.h"
14#include "llvm/ADT/SmallVector.h"
24 llvm::SmallVector<mlir::Operation *>
nodes;
26 llvm::DenseMap<mlir::Operation *, std::string>
features;
27 llvm::DenseMap<mlir::Operation *,
28 llvm::SmallVector<std::pair<std::string, mlir::Operation *>>>
33 std::string &
add(mlir::Operation *op);
36 void link(mlir::Operation *from, mlir::Operation *to, llvm::StringRef label);
42 llvm::DenseMap<mlir::Operation *, unsigned>
rank()
const;
Ops and the labelled links between them, for ranking them by structure where a pass would otherwise f...
void link(mlir::Operation *from, mlir::Operation *to, llvm::StringRef label)
Link from to to under label, and to back to from.
llvm::SmallVector< mlir::Operation * > nodes
std::string & add(mlir::Operation *op)
Add op as a node whose features are its name and attributes, symbol names and references left out.
llvm::DenseMap< mlir::Operation *, unsigned > rank() const
Rank the nodes by their features and then, a round at a time until no class splits,...
llvm::DenseMap< mlir::Operation *, std::string > features
What each node is, before anything it links to is considered.
static StructuralGraph of(mlir::ModuleOp module)
Each device of module with its graph (of(DeviceOp)), the device a node linked to every op in it,...
static StructuralGraph of(DeviceOp device)
The ops directly in device but its runtime sequences, each with the ops nested in it,...
llvm::DenseMap< mlir::Operation *, llvm::SmallVector< std::pair< std::string, mlir::Operation * > > > links