[llvm] r316953 - [NewGVN] Stop assuming PHI args ordering when looking at phi-of-ops.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 13:24:39 PDT 2017


On Mon, Oct 30, 2017 at 1:20 PM, Davide Italiano via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: davide
> Date: Mon Oct 30 13:20:16 2017
> New Revision: 316953
>
> URL: http://llvm.org/viewvc/llvm-project?rev=316953&view=rev
> Log:
> [NewGVN] Stop assuming PHI args ordering when looking at phi-of-ops.
>
> It's not guaranteed. There's a bug open to sort them in predecessor
> order, but it won't happen anytime soon. In the meanwhile, passes
> will have to do an O(#preds) scan. Such is life.
>

Let me clarify my comment. If somebody has the time/energy to fix
this, it would be great, but I'm not holding my breath, because it's
ridiculous amount of thankless work. For reference,
https://bugs.llvm.org/show_bug.cgi?id=32981
This has bitten us at least twice (or three times) in NewGVN, and
maybe there are other passes which rely on this undocumented (and
unrespected invariant), so, latent bugs :(

Best,

--
Davide


More information about the llvm-commits mailing list