[Mlir-commits] [mlir] [MLIR][LLVM] Support Recursive DITypes (PR #80251)

Tobias Gysi llvmlistbot at llvm.org
Wed Feb 28 22:40:08 PST 2024


gysit wrote:

Thanks for the changes! I will do another evening review this time I hopefully manage to look at the full revision!

> Re: two pass vs one pass, I think the main challenge is how to replace in the second pass. E.g. if we have a cycle A -> B -> C -> A. Then in the first pass, we create 4 nodes: A -> B -> C -> D (D is a copy of A with holes). But now if we want to replace D with A, we need C to be mutable

I was thinking of stopping the traversal once a recursion is detected. So once we see the A attribute for the second time we would insert the placeholder node into C and stop the traversal. That means no update of C should be necessary. The second pass would then just replace the elements on all placeholder (incomplete nodes). However, the more I think about it the more I believe that this maybe more complex overall and probably also slower.

https://github.com/llvm/llvm-project/pull/80251


More information about the Mlir-commits mailing list