When doing topological sort we need to make sure an op is scheduled before any of the ops within its regions.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I have a following patch using this, I can combine it or do you think it should be tested independently of any other user? I would need to add some test pass for this and somehow test slicing/sorting individually.
Comment Actions
Can you stack up the dependent change in Phabricator?
mlir/lib/Analysis/SliceAnalysis.cpp | ||
---|---|---|
173–174 | Reading the code a bit more now, this seems like a recursive algorithm on use-def chain? This really should be iterative instead. |
Comment Actions
So I ended up adding a test pass just for this. Let me know what you think.
mlir/lib/Analysis/SliceAnalysis.cpp | ||
---|---|---|
173–174 | Changed it to be iterative. |
Reading the code a bit more now, this seems like a recursive algorithm on use-def chain?
Seems like a ticking bomb for a stack overflow (we call this out in the list here: https://mlir.llvm.org/getting_started/DeveloperGuide/#style-guide )
This really should be iterative instead.