CIRCT 24.0.0git
Loading...
Searching...
No Matches
PrettifyVerilog.cpp File Reference
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/SV/SVOps.h"
#include "circt/Dialect/SV/SVPasses.h"
#include "circt/Support/LoweringOptions.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/Matchers.h"
#include "mlir/Pass/Pass.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/TypeSwitch.h"
#include "circt/Dialect/SV/SVPasses.h.inc"
Include dependency graph for PrettifyVerilog.cpp:

Go to the source code of this file.

Namespaces

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

Macros

#define GEN_PASS_DEF_PRETTIFYVERILOG

Functions

static bool isPrettifiableUnaryOperator (Operation *op)
 Return true if this is a unary operator that is cheap enough to sink or duplicate into its users as part of prettification.
static std::optional< APInt > getInt (Value value)
 Helper to convert a value to a constant integer if it is one.
static bool isSelfWrite (Value dst, Value src)
static unsigned getBlockDepth (Block *block, Block *topBlock)

Macro Definition Documentation

◆ GEN_PASS_DEF_PRETTIFYVERILOG

#define GEN_PASS_DEF_PRETTIFYVERILOG

Definition at line 34 of file PrettifyVerilog.cpp.

Function Documentation

◆ getBlockDepth()

unsigned getBlockDepth ( Block * block,
Block * topBlock )
static

Definition at line 395 of file PrettifyVerilog.cpp.

◆ getInt()

std::optional< APInt > getInt ( Value value)
static

Helper to convert a value to a constant integer if it is one.

Definition at line 81 of file PrettifyVerilog.cpp.

Referenced by circt::seq::FirMemory::FirMemory(), getSubModuleName(), and isSelfWrite().

◆ isPrettifiableUnaryOperator()

bool isPrettifiableUnaryOperator ( Operation * op)
static

Return true if this is a unary operator that is cheap enough to sink or duplicate into its users as part of prettification.

Definition at line 71 of file PrettifyVerilog.cpp.

◆ isSelfWrite()

bool isSelfWrite ( Value dst,
Value src )
static

Definition at line 90 of file PrettifyVerilog.cpp.

References getInt(), and isSelfWrite().

Referenced by isSelfWrite().