Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions include/dynamatic/Dialect/Handshake/HandshakeOps.h
Original file line number Diff line number Diff line change
Expand Up @@ -625,4 +625,17 @@ class HasParentInterface {
#define GET_OP_CLASSES
#include "dynamatic/Dialect/Handshake/Handshake.h.inc"

template <>
struct llvm::PointerLikeTypeTraits<dynamatic::handshake::ConstantOp> {
static void *getAsVoidPointer(dynamatic::handshake::ConstantOp val) {
return const_cast<void *>(val.getAsOpaquePointer());
}

static dynamatic::handshake::ConstantOp getFromVoidPointer(void *p) {
return dynamatic::handshake::ConstantOp::getFromOpaquePointer(p);
}
static constexpr int NumLowBitsAvailable =
PointerLikeTypeTraits<mlir::Operation *>::NumLowBitsAvailable;
};

#endif // DYNAMATIC_DIALECT_HANDSHAKE_HANDSHAKE_OPS_H
29 changes: 0 additions & 29 deletions include/dynamatic/Transforms/HandshakeMinimizeCstWidth.h

This file was deleted.

15 changes: 0 additions & 15 deletions include/dynamatic/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,6 @@ def HandshakeOptimizeBitwidths : DynamaticPass< "handshake-optimize-bitwidths",
];
}

def HandshakeMinimizeCstWidth : DynamaticPass<"handshake-minimize-cst-width",
["mlir::arith::ArithDialect"]> {
let summary = "Minimizes the bitwidth of all Handshake constants.";
let description = [{
Rewrites constant operations with the minimum required bitwidth to support
the constants' values. The pass inserts extension operations as needed to
ensure consistency with users of constant operations. The pass also pays
attention to not create duplicated constants indirectly due to the
minimization process.
}];
let options =
[Option<"optNegatives", "opt-negatives", "bool", "false",
"If true, allows bitwidth optimization of negative values.">];
}

def HandshakeReplaceMemoryInterfaces : DynamaticPass<
"handshake-replace-memory-interfaces"
> {
Expand Down
2 changes: 1 addition & 1 deletion integration-test/if_convert/buffer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"comment": "To achieve better II"
},
{
"pred": "constant11",
"pred": "constant1",
"outid": 0,
"slots": 4,
"type": "fifo_break_none",
Expand Down
2 changes: 1 addition & 1 deletion integration-test/nested_loop/buffer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"comment": "Buffer non-spec token to prevent II=2 locking"
},
{
"pred": "constant18",
"pred": "constant1",
"outid": 0,
"slots": 4,
"type": "fifo_break_none",
Expand Down
2 changes: 1 addition & 1 deletion integration-test/single_loop/buffer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"comment": "To absorb latency for spec_commit4 (data)"
},
{
"pred": "constant9",
"pred": "constant2",
"outid": 0,
"slots": 5,
"type": "fifo_break_none",
Expand Down
1 change: 0 additions & 1 deletion lib/Transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ add_dynamatic_library(DynamaticTransforms
HandshakeCanonicalize.cpp
HandshakeHoistExtInstances.cpp
HandshakeMaterialize.cpp
HandshakeMinimizeCstWidth.cpp
HandshakeOptimizeBitwidths.cpp
HandshakeInferBasicBlocks.cpp
HandshakeReplaceMemoryInterfaces.cpp
Expand Down
208 changes: 0 additions & 208 deletions lib/Transforms/HandshakeMinimizeCstWidth.cpp

This file was deleted.

Loading
Loading