CIRCT 22.0.0git
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
RemoveControlFlow.cpp File Reference
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/LLHD/IR/LLHDOps.h"
#include "circt/Dialect/LLHD/Transforms/LLHDPasses.h"
#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
#include "mlir/IR/Dominance.h"
#include "mlir/IR/Matchers.h"
#include "mlir/Pass/Pass.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/Support/Debug.h"
#include "circt/Dialect/LLHD/Transforms/LLHDPasses.h.inc"
Include dependency graph for RemoveControlFlow.cpp:

Go to the source code of this file.

Namespaces

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

Macros

#define DEBUG_TYPE   "llhd-remove-control-flow"
 
#define GEN_PASS_DEF_REMOVECONTROLFLOWPASS
 

Functions

static Condition getBranchDecisionsFromDominatorToTarget (OpBuilder &builder, Block *dominator, Block *target, SmallDenseMap< std::pair< Block *, Block * >, Condition > &decisions)
 Compute the branch decisions that cause control to flow from the dominator to the target block.
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "llhd-remove-control-flow"

Definition at line 20 of file RemoveControlFlow.cpp.

◆ GEN_PASS_DEF_REMOVECONTROLFLOWPASS

#define GEN_PASS_DEF_REMOVECONTROLFLOWPASS

Definition at line 24 of file RemoveControlFlow.cpp.

Function Documentation

◆ getBranchDecisionsFromDominatorToTarget()

static Condition getBranchDecisionsFromDominatorToTarget ( OpBuilder &  builder,
Block *  dominator,
Block *  target,
SmallDenseMap< std::pair< Block *, Block * >, Condition > &  decisions 
)
static

Compute the branch decisions that cause control to flow from the dominator to the target block.

TODO: This eagerly aggregates all control flow decisions. It may be more efficient to first determine which blocks lie in between dominator and target, and then only check that we are not taking decisions that cause control flow to leave that set of blocks.

Definition at line 112 of file RemoveControlFlow.cpp.

References assert().