Skip to content

Commit

Permalink
[Scheduling] computeStartTimesInCycle: clear before recomputation (#6951
Browse files Browse the repository at this point in the history
)

This PR adds a `clearStartTimesInCycle()` method to the ChainingProblem to simplify the reuse of one problem instance for multiple solving attempts.
  • Loading branch information
7FM authored Apr 26, 2024
1 parent 416267b commit d2ba096
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/circt/Scheduling/Problems.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ class ChainingProblem : public virtual Problem {
void setStartTimeInCycle(Operation *op, float time) {
startTimeInCycle[op] = time;
}
void clearStartTimeInCycle() { startTimeInCycle.clear(); }

virtual PropertyStringVector getProperties(Operation *op) override;
virtual PropertyStringVector getProperties(OperatorType opr) override;
Expand Down
1 change: 1 addition & 0 deletions lib/Scheduling/ChainingSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ LogicalResult scheduling::computeChainBreakingDependences(
}

LogicalResult scheduling::computeStartTimesInCycle(ChainingProblem &prob) {
prob.clearStartTimeInCycle();
return handleOperationsInTopologicalOrder(prob, [&](Operation *op) {
// `op` will start within its abstract time step as soon as all operand
// values have reached it.
Expand Down

0 comments on commit d2ba096

Please sign in to comment.