MLIR-AIE 1.4.5.dev
xilinx::AIE::StructuralGraph Struct Reference

Ops and the labelled links between them, for ranking them by structure where a pass would otherwise fall back on op order. More...

#include "aie/Dialect/AIE/Transforms/AIEStructuralRank.h"

Collaboration diagram for xilinx::AIE::StructuralGraph:

Public Member Functions

std::string & add (mlir::Operation *op)
 Add op as a node whose features are its name and attributes, symbol names and references left out.
void link (mlir::Operation *from, mlir::Operation *to, llvm::StringRef label)
 Link from to to under label, and to back to from.
llvm::DenseMap< mlir::Operation *, unsigned > rank () const
 Rank the nodes by their features and then, a round at a time until no class splits, by the ranks of the nodes they link to.

Static Public Member Functions

static StructuralGraph of (DeviceOp device)
 The ops directly in device but its runtime sequences, each with the ops nested in it, linked to the ops whose results or symbols they use.

Public Attributes

llvm::SmallVector< mlir::Operation * > nodes
llvm::DenseMap< mlir::Operation *, std::string > features
 What each node is, before anything it links to is considered.
llvm::DenseMap< mlir::Operation *, llvm::SmallVector< std::pair< std::string, mlir::Operation * > > > links

Detailed Description

Ops and the labelled links between them, for ranking them by structure where a pass would otherwise fall back on op order.

Definition at line 23 of file AIEStructuralRank.h.

Member Function Documentation

◆ add()

std::string & StructuralGraph::add ( mlir::Operation * op)

Add op as a node whose features are its name and attributes, symbol names and references left out.

Returns the features to extend.

Definition at line 39 of file AIEStructuralRank.cpp.

References features, and nodes.

Referenced by of().

◆ link()

void StructuralGraph::link ( mlir::Operation * from,
mlir::Operation * to,
llvm::StringRef label )

Link from to to under label, and to back to from.

Definition at line 46 of file AIEStructuralRank.cpp.

References links.

Referenced by of().

◆ of()

StructuralGraph StructuralGraph::of ( DeviceOp device)
static

The ops directly in device but its runtime sequences, each with the ops nested in it, linked to the ops whose results or symbols they use.

The runtime sequence is left out, so a device ranks the same whatever sequence drives it.

Definition at line 88 of file AIEStructuralRank.cpp.

References add(), features, link(), and nodes.

Referenced by xilinx::AIE::Placer::collectOperations().

◆ rank()

DenseMap< Operation *, unsigned > StructuralGraph::rank ( ) const

Rank the nodes by their features and then, a round at a time until no class splits, by the ranks of the nodes they link to.

Neither op order nor symbol names play a part, so a permuted or renamed design ranks alike, and nodes left with one rank cannot be told apart.

Definition at line 51 of file AIEStructuralRank.cpp.

References features, links, nodes, and rank().

Referenced by xilinx::AIE::Placer::collectOperations(), and rank().

Member Data Documentation

◆ features

llvm::DenseMap<mlir::Operation *, std::string> xilinx::AIE::StructuralGraph::features

What each node is, before anything it links to is considered.

Definition at line 26 of file AIEStructuralRank.h.

Referenced by add(), of(), and rank().

◆ links

llvm::DenseMap<mlir::Operation *, llvm::SmallVector<std::pair<std::string, mlir::Operation *> > > xilinx::AIE::StructuralGraph::links

Definition at line 29 of file AIEStructuralRank.h.

Referenced by link(), and rank().

◆ nodes

llvm::SmallVector<mlir::Operation *> xilinx::AIE::StructuralGraph::nodes

Definition at line 24 of file AIEStructuralRank.h.

Referenced by add(), of(), and rank().


The documentation for this struct was generated from the following files: