[PATCH] D43865: [NewGVN] Create new ValuePHI node, if the number of operands does not match.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 6 09:37:42 PST 2018
fhahn added a comment.
In https://reviews.llvm.org/D43865#1026006, @dberlin wrote:
> There, it gets past the safety checking/etc, and all the way to the valuephi creation, but now the value phi is in the wrong block.
>
> The correct way to handle all of this is unfortunately recursive.
> We'd have to translate through each phi and phi block that occurs as an operand, and evaluate the operation in every possible predecessor of those, and merge those results.
>
> This is unlikely to be worth it ATM, it seems incredibly uncommon.
> It would be easy, however, if we refactored this code sanely.
>
> For now, safety wise, we should verify all phis for an op are in the same block and give up if not.
> I'll send along a patch to fhahn that works but is otherwise untested.
Thanks for tracking that down and for sending along a patch. As far as I can see, it splits up analysis and the phi creation, which makes it much easier to see what going on :) It also fixes the issue by checking if all phis for on op are in the same block
Given that, I was wondering if there is anything left you want me to do or I should look into? :)
https://reviews.llvm.org/D43865
More information about the llvm-commits
mailing list