[Mlir-commits] [mlir] [MLIR][LLVM] Use CyclicReplacerCache for recursive DIType import (PR #98203)
Christian Ulmann
llvmlistbot at llvm.org
Thu Aug 1 23:16:41 PDT 2024
Dinistro wrote:
I'm unsure if making 0 (in this case DISubprogram) a cycle breaker would solve the issue or if we would require changes to the algorithm all-together.
Assuming that cycle breaking is enough, then we only have specific nodes we find that will have back-edges when walking the debug metadata in the import. So far, we are aware of `DICompositeType` and `DISubprogram`. The question is if there are any more cases where this can happen.
I currently see three different way in how we could deal with that:
1. Add cycle-breaking support for every node type
2. Deeply analyse the debug metadata documentation and find all necessary cycle-breakers. Given the state of the documentation, this might be very hard, though.
3. Iteratively add cycle breaking for issues we find along the way. While this might require some cycles (pun intended), the assertion should help us in finding these.
> Thanks for the repro btw. Very easy to digest.
`llvm-reduce` can do magic ;P
https://github.com/llvm/llvm-project/pull/98203
More information about the Mlir-commits
mailing list