[Mlir-commits] [mlir] [mlir][LLVM] Improve `llvm.extractvalue` folder (PR #136861)
Matthias Springer
llvmlistbot at llvm.org
Wed Apr 23 11:17:28 PDT 2025
matthias-springer wrote:
> non blocking, but passing by comment:
>
> Instead of traversing the chain, can we not instead fold the source to be the source of the insert if the current insert doesn't affect the extract value? That seems to be a more general, less traversal oriented approach. What do you think?
Yes, that would work. The existing traversal, both for the element and the container (even before this PR), could be rewritten in such a way. That would make the code a bit simpler. But it would make foldings more expensive because you would have to fold multiple times. I can only speculate, but I think that's the reason why we use a traversal here.
https://github.com/llvm/llvm-project/pull/136861
More information about the Mlir-commits
mailing list