Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UseGraph::replace #6395

Merged
merged 11 commits into from
Feb 25, 2025
Prev Previous commit
Next Next commit
Update slang-ir-autodiff-primal-hoist.cpp
saipraveenb25 committed Feb 19, 2025
commit f4634cec0bee93fc9d864ac6b0d6b39215802902
10 changes: 0 additions & 10 deletions source/slang/slang-ir-autodiff-primal-hoist.cpp
Original file line number Diff line number Diff line change
@@ -1465,16 +1465,6 @@ struct UseGraph
builder->replaceOperand(relevantUse, lastInstInChain);
}

bool isTrivial(const List<UseChain>& chains)
{
// We're trivial if there's only one chain, and it has only one use.
if (chains.getCount() != 1)
return false;

auto& chain = chains.getFirst().chain;
return chain.getCount() == 1;
}

List<IRUse*> getUniqueUses() const
{
List<IRUse*> result;