CIRCT  19.0.0git
Namespaces | Macros | Functions
MemoryToBlockArgumentPass.cpp File Reference
#include "circt/Dialect/LLHD/IR/LLHDOps.h"
#include "circt/Dialect/LLHD/Transforms/Passes.h"
#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/IR/Dominance.h"
#include "mlir/Pass/Pass.h"
#include <set>
#include "circt/Dialect/LLHD/Transforms/Passes.h.inc"
Include dependency graph for MemoryToBlockArgumentPass.cpp:

Go to the source code of this file.

Namespaces

 circt
 The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
 
 circt::llhd
 

Macros

#define GEN_PASS_DEF_MEMORYTOBLOCKARGUMENT
 

Functions

static void getDominanceFrontier (Block *frontierOf, Operation *op, std::set< Block * > &df)
 Add the dominance fontier blocks of 'frontierOf' to the 'df' set. More...
 
static void getDFClosure (SmallVectorImpl< Block * > &initialSet, Operation *op, std::set< Block * > &closure)
 Add the blocks in the closure of the dominance fontier relation of all the block in 'initialSet' to 'closure'. More...
 
static void addBlockOperandToTerminator (Operation *terminator, Block *successsor, Value toAppend)
 Add a block argument to a given terminator. More...
 

Macro Definition Documentation

◆ GEN_PASS_DEF_MEMORYTOBLOCKARGUMENT

#define GEN_PASS_DEF_MEMORYTOBLOCKARGUMENT

Definition at line 23 of file MemoryToBlockArgumentPass.cpp.

Function Documentation

◆ addBlockOperandToTerminator()

static void addBlockOperandToTerminator ( Operation *  terminator,
Block *  successsor,
Value  toAppend 
)
static

Add a block argument to a given terminator.

Only 'std.br', 'std.cond_br' and 'llhd.wait' are supported. The successor block has to be provided for the 'std.cond_br' terminator which has two possible successors.

Definition at line 74 of file MemoryToBlockArgumentPass.cpp.

◆ getDFClosure()

static void getDFClosure ( SmallVectorImpl< Block * > &  initialSet,
Operation *  op,
std::set< Block * > &  closure 
)
static

Add the blocks in the closure of the dominance fontier relation of all the block in 'initialSet' to 'closure'.

Definition at line 57 of file MemoryToBlockArgumentPass.cpp.

References getDominanceFrontier(), and numElements.

◆ getDominanceFrontier()

static void getDominanceFrontier ( Block *  frontierOf,
Operation *  op,
std::set< Block * > &  df 
)
static

Add the dominance fontier blocks of 'frontierOf' to the 'df' set.

Definition at line 41 of file MemoryToBlockArgumentPass.cpp.

Referenced by getDFClosure().