|
CIRCT 23.0.0git
|
#include "../PassDetails.h"#include "circt/Dialect/Comb/CombOps.h"#include "circt/Dialect/ESI/ESIOps.h"#include "circt/Dialect/HW/HWOps.h"#include "circt/Dialect/SV/SVOps.h"#include "circt/Dialect/Seq/SeqOps.h"#include "circt/Support/BackedgeBuilder.h"#include "circt/Support/LLVM.h"#include "circt/Support/SymCache.h"#include "mlir/Transforms/DialectConversion.h"#include "mlir/Transforms/GreedyPatternRewriteDriver.h"#include "llvm/ADT/StringExtras.h"#include "llvm/ADT/TypeSwitch.h"#include "llvm/Support/JSON.h"#include "circt/Dialect/ESI/ESIPasses.h.inc"
Go to the source code of this file.
Namespaces | |
| namespace | circt |
| The InstanceGraph op interface, see InstanceGraphInterface.td for more details. | |
| namespace | circt::esi |
Macros | |
| #define | GEN_PASS_DEF_LOWERESITOHW |
Functions | |
| static bool | typeContainsChannel (Type type) |
Returns true if type is an ESI channel or an aggregate (e.g. | |
| static void | canonicalizeChannelOps (Operation *top, MLIRContext *ctxt) |
| Greedily canonicalize every op whose type involves an ESI channel. | |
| static bool | anyTypeContainsChannel (TypeRange types) |
Returns true if any of types is or contains an ESI channel. | |
| static bool | verifyNoChannelsRemain (Operation *top, MLIRContext *ctxt) |
Verify that no ESI channel ops or channel-typed values remain under top, which the channel lowering is responsible for removing. | |
| #define GEN_PASS_DEF_LOWERESITOHW |
Definition at line 33 of file ESILowerToHW.cpp.
|
static |
Returns true if any of types is or contains an ESI channel.
Definition at line 799 of file ESILowerToHW.cpp.
References typeContainsChannel().
Referenced by verifyNoChannelsRemain().
|
static |
Greedily canonicalize every op whose type involves an ESI channel.
This hopefully removes all channel ops: channel-typed aggregates (e.g. hw.array_create/ array_get over channels) fold away, exposing adjacent wrap/unwrap pairs that the wrap/unwrap canonicalizers then merge. A greedy rewrite is used (rather than a dialect conversion) because this requires folding, DCE, and iterating to a fixpoint, none of which the conversion driver does.
Definition at line 777 of file ESILowerToHW.cpp.
References typeContainsChannel().
|
static |
Returns true if type is an ESI channel or an aggregate (e.g.
array, struct) that contains a channel somewhere within it.
Definition at line 765 of file ESILowerToHW.cpp.
Referenced by anyTypeContainsChannel(), and canonicalizeChannelOps().
|
static |
Verify that no ESI channel ops or channel-typed values remain under top, which the channel lowering is responsible for removing.
Returns true if all channels were removed; otherwise emits diagnostics on a handful of offenders (rather than all of them) and returns false.
Definition at line 807 of file ESILowerToHW.cpp.
References anyTypeContainsChannel().