Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b499cd2
adding pass, some examples fail
zeinabPourgheisari Apr 18, 2026
53274bf
Changed buffer placement + term rewrite pass
AyaElAkhras Apr 28, 2026
9b4c555
adding optimize-steering-rewrites flag
zeinabPourgheisari May 1, 2026
b2f5d60
Fix on handshake rewrite
zeinabPourgheisari Jun 3, 2026
760409f
Merge branch 'main' into adding-term-rewrite
zeinabPourgheisari Jun 3, 2026
b62113d
default compile.sh
zeinabPourgheisari Jun 16, 2026
65e66ef
unconditional -combine-steering-logic
zeinabPourgheisari Jun 16, 2026
c9aaaf1
Merge branch 'main' into adding-term-rewrite
zeinabPourgheisari Jun 16, 2026
24cd3f7
Move rewrite terms pass to experimental
zeinabPourgheisari Jun 16, 2026
1313ec8
Add steering rewrite flag to compile flow
zeinabPourgheisari Jun 17, 2026
13ff669
Modify steering flag
zeinabPourgheisari Jun 24, 2026
77d5e9f
Merge remote-tracking branch 'origin/main' into adding-term-rewrite
zeinabPourgheisari Jun 27, 2026
4f881be
remove logLines
zeinabPourgheisari Jul 3, 2026
3949312
Avoid start-derived memory control rewrites
zeinabPourgheisari Jul 20, 2026
92e16be
Merge branch 'main' into adding-term-rewrite
zeinabPourgheisari Jul 20, 2026
284e3f9
Disable constant replication in STQ materialization
zeinabPourgheisari Jul 20, 2026
c1fa98e
Fix CFDFC build without Graphviz headers
zeinabPourgheisari Jul 20, 2026
d4dcc80
CI check-format
zeinabPourgheisari Jul 20, 2026
83757ec
Add provisional lit test for handshake rewrite terms
zeinabPourgheisari Jul 22, 2026
a159a27
Fix suppress distribution for repeated uses in one operation
zeinabPourgheisari Jul 31, 2026
c8b5984
Improve comments
zeinabPourgheisari Aug 3, 2026
2e22a2c
clear comments and prints
zeinabPourgheisari Aug 11, 2026
eda5ed9
merge/ mux RemoveBranchIfThenElse
zeinabPourgheisari Aug 12, 2026
75757da
remove OPTIM_DISTR and OPTIM_BRANCH_TO_SUPP
zeinabPourgheisari Aug 13, 2026
b2b4c70
Merge remote-tracking branch 'origin/main' into adding-term-rewrite
zeinabPourgheisari Aug 13, 2026
dddc784
ci format
zeinabPourgheisari Aug 13, 2026
78b23e4
Excluding buffering support
zeinabPourgheisari Aug 13, 2026
2707b46
Buffer placement edit
zeinabPourgheisari Aug 13, 2026
3068a72
Merge remote-tracking branch 'origin' into adding-term-rewrite
zeinabPourgheisari Aug 13, 2026
3c9bb28
remove outdated handshake-rewrite-terms.mlir
zeinabPourgheisari Aug 13, 2026
a50e57a
remove Shorten Pairs
zeinabPourgheisari Aug 17, 2026
fcc4a6d
CI
zeinabPourgheisari Aug 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//===- HandshakeRewriteTerms.h - Rewrite Terms in Handshake Operation Sequences
//-----*- C++ -*-===//
//
// Dynamatic is under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file declares the --handshake-rewrite-terms pass.
//
//===----------------------------------------------------------------------===//

#ifndef EXPERIMENTAL_TRANSFORMS_HANDSHAKEREWRITETERMS_H
#define EXPERIMENTAL_TRANSFORMS_HANDSHAKEREWRITETERMS_H

#include "dynamatic/Support/DynamaticPass.h"
#include "dynamatic/Support/LLVM.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/IR/DialectRegistry.h"
#include "mlir/Pass/Pass.h"

namespace dynamatic {
namespace experimental {

#define GEN_PASS_DECL_HANDSHAKEREWRITETERMS
#define GEN_PASS_DEF_HANDSHAKEREWRITETERMS
#include "experimental/Transforms/Passes.h.inc"

std::unique_ptr<dynamatic::DynamaticPass> rewriteHandshakeTerms();

} // namespace experimental
} // namespace dynamatic

#endif // EXPERIMENTAL_TRANSFORMS_HANDSHAKEREWRITETERMS_H
2 changes: 2 additions & 0 deletions experimental/include/experimental/Transforms/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "dynamatic/Support/LLVM.h"
#include "mlir/Pass/Pass.h"

#include "experimental/Transforms/HandshakeRewriteTerms.h"

namespace dynamatic {
namespace experimental {
/// Generate the code for registering passes.
Expand Down
12 changes: 12 additions & 0 deletions experimental/include/experimental/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
include "dynamatic/Support/Passes.td"
include "mlir/Pass/PassBase.td"

def HandshakeRewriteTerms : DynamaticPass< "handshake-rewrite-terms"> {
let summary = "Rewrite terms in Handshake operation sequences.";
let description = [{
Removes redundant operations and simplifies the IR by applying a series
of optimizations. The pass uses a greedy pattern rewriter to apply the
optimizations, which are based on the specific semantics of Handshake
operations. The pass is conservative and does not perform any aggressive
transformations that could potentially change the behavior of the circuit.
}];
let constructor = "dynamatic::experimental::rewriteHandshakeTerms()";
}

def HandshakeCombineSteeringLogic : DynamaticPass< "handshake-combine-steering-logic"> {
let summary = "Combine common steering logic between different handshake operations.";
let description = [{
Expand Down
1 change: 1 addition & 0 deletions experimental/lib/Transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
add_dynamatic_library(DynamaticExperimentalTransforms
HandshakePlaceBuffersCustom.cpp
HandshakeCombineSteeringLogic.cpp
HandshakeRewriteTerms.cpp
HandshakeStraightToQueue.cpp

DEPENDS
Expand Down
Loading
Loading