Skip to content

Commit fa73e07

Browse files
authored
[LLHD] Don't implement BranchOpInterface for WaitOp (#8241)
BranchOpInterface requries the control-flow edges to be side-effect free. However, WaitOp suspends execution and once execution is resumed, values on signals are expected to have changed from outside the process
1 parent 28a82db commit fa73e07

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

include/circt/Dialect/LLHD/IR/LLHDStructureOps.td

-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def WaitOp : LLHDOp<"wait", [
111111
Terminator,
112112
AttrSizedOperandSegments,
113113
HasParent<"ProcessOp">,
114-
DeclareOpInterfaceMethods<BranchOpInterface>
115114
]> {
116115
let summary = "Suspends execution of a process.";
117116
let description = [{

lib/Dialect/LLHD/IR/LLHDOps.cpp

-10
Original file line numberDiff line numberDiff line change
@@ -478,16 +478,6 @@ DrvOp::ensureOnlySafeAccesses(const MemorySlot &slot,
478478
return success();
479479
}
480480

481-
//===----------------------------------------------------------------------===//
482-
// WaitOp
483-
//===----------------------------------------------------------------------===//
484-
485-
// Implement this operation for the BranchOpInterface
486-
SuccessorOperands llhd::WaitOp::getSuccessorOperands(unsigned index) {
487-
assert(index == 0 && "invalid successor index");
488-
return SuccessorOperands(getDestOpsMutable());
489-
}
490-
491481
//===----------------------------------------------------------------------===//
492482
// ConnectOp
493483
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)