[PATCH] D35474: SSAUpdater: Add mode when Phi creation is not allowed

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 22:42:41 PDT 2017


dberlin added a comment.

SSA Updater exists to perform SSA Updates for complicated cases (I also have a patch out to rewrite it, because it's super-slow.  The algorithm i gave you is a variant of that patch.  See https://reviews.llvm.org/D28934).

Most algorithms in LLVM are pretty straightforward to update, but things like "copying a loop and then unrolling + vectorizing it", may be difficult.

SSAUpdater can perform the updating for these cases.  You give it a set of existing values, and tell it what block you are trying to place a new value in, and it will insert the right set of phi nodes.

You are using it as an available value finder, which it's not really meant for, and there are much faster ways of doing.

Without seeing your patch, i would expect you could just look at the uses of your defs to see if a phi node exists that meets your specifications.
But if you have to understand what such a phi node would look like, the algorithm i gave should do it.

In any case, SSAUpdater is really not the right mechanism to go find what phis match a certain set of values.
:)


https://reviews.llvm.org/D35474





More information about the llvm-commits mailing list