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

Billy Zhu llvmlistbot at llvm.org
Wed Feb 28 17:21:25 PST 2024


zyx-billy wrote:

Thanks for taking a look at this! I've addressed all your code comments.

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, which makes it a requirement that all DITypes need to allow all operands to be mutable. Please feel free to correct my understanding here, but I feel like that's not the case today? Otherwise, we'd have to replace the entire B -> C -> D chain, which seems wasteful, and also runs into more complexity if we have nested recursion. So it seems simpler to just create the chain with A already at the end, and just mutate A instead.

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


More information about the Mlir-commits mailing list