Skip to content

Commit

Permalink
[FIRRTL] Remove support for printf-encoded verification, tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtzSiFive committed May 13, 2024
1 parent 4a240b9 commit 9cdb5d7
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 1,116 deletions.
1 change: 0 additions & 1 deletion lib/Dialect/FIRRTL/Import/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ add_circt_translation_library(CIRCTImportFIRFile
FIRAnnotations.cpp
FIRLexer.cpp
FIRParser.cpp
FIRParserAsserts.cpp

ADDITIONAL_HEADER_DIRS

Expand Down
35 changes: 0 additions & 35 deletions lib/Dialect/FIRRTL/Import/FIRParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5390,41 +5390,6 @@ FIRCircuitParser::parseModuleBody(const SymbolTable &circuitSymTbl,
if (failed(result))
return result;

// Convert print-encoded verifications after parsing.

{
// Gather PrintFOps and then process to avoid walking while mutating.
SmallVector<PrintFOp> buffer;
deferredModule.moduleOp.walk(
[&buffer](PrintFOp printFOp) { buffer.push_back(printFOp); });

size_t numVerifPrintfs = 0;
std::optional<Location> printfLoc;
for (auto printFOp : buffer) {
auto loc = printFOp.getLoc();
auto result = circt::firrtl::foldWhenEncodedVerifOp(printFOp);
if (failed(result))
return failure();
if (*result) {
++numVerifPrintfs;
if (!printfLoc)
printfLoc = loc;
}
}
if (numVerifPrintfs > 0) {
auto diag =
mlir::emitWarning(deferredModule.moduleOp.getLoc(),
"module contains ")
<< numVerifPrintfs
<< " printf-encoded verification operation(s), which are deprecated "
"and will be removed in the future";
diag.attachNote(*printfLoc)
<< "example printf here, will just be a printf in the future";
diag.attachNote() << "For more information, see "
"https://github.com/llvm/circt/issues/6970";
}
}

// Demote any forceable operations that aren't being forced.
deferredModule.moduleOp.walk([](Forceable fop) {
if (fop.isForceable() && fop.getDataRef().use_empty())
Expand Down
Loading

0 comments on commit 9cdb5d7

Please sign in to comment.