Skip to content

Commit

Permalink
[LLHD] Don't implement BranchOpInterface for WaitOp (#8241)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
maerhart authored Feb 14, 2025
1 parent 28a82db commit fa73e07
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion include/circt/Dialect/LLHD/IR/LLHDStructureOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def WaitOp : LLHDOp<"wait", [
Terminator,
AttrSizedOperandSegments,
HasParent<"ProcessOp">,
DeclareOpInterfaceMethods<BranchOpInterface>
]> {
let summary = "Suspends execution of a process.";
let description = [{
Expand Down
10 changes: 0 additions & 10 deletions lib/Dialect/LLHD/IR/LLHDOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,16 +478,6 @@ DrvOp::ensureOnlySafeAccesses(const MemorySlot &slot,
return success();
}

//===----------------------------------------------------------------------===//
// WaitOp
//===----------------------------------------------------------------------===//

// Implement this operation for the BranchOpInterface
SuccessorOperands llhd::WaitOp::getSuccessorOperands(unsigned index) {
assert(index == 0 && "invalid successor index");
return SuccessorOperands(getDestOpsMutable());
}

//===----------------------------------------------------------------------===//
// ConnectOp
//===----------------------------------------------------------------------===//
Expand Down

0 comments on commit fa73e07

Please sign in to comment.