Skip to content

Commit

Permalink
Fix when ops have multiple operands
Browse files Browse the repository at this point in the history
  • Loading branch information
panickal-xmos committed May 14, 2024
1 parent 8813815 commit 0c200df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xformer/Analysis/MemoryPlan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ std::vector<int> MemoryPlan::getAllocatedOffsets(const bool overlapOps,
auto outVal = o->getResult(0);
auto nextOp = *outVal.getUsers().begin();
// Identify chain of overlappable Ops
while (outVal.hasOneUse() &&
while (outVal.hasOneUse() && !alreadyVisited.contains(nextOp) &&
nextOp->hasTrait<OpTrait::xcore::MemoryOverlappable>()) {
inVal = nextOp->getOperand(0);
inVal = outVal;
inputVals.push_back(inVal);
alreadyVisited.insert(nextOp);
outVal = nextOp->getResult(0);
Expand Down

0 comments on commit 0c200df

Please sign in to comment.