Fix PR36484, as suggested:
during moves, mark the direct users of the erased things that were phis as "not to be optimized"
zzheng on Mar 8 2018, 9:54 AM.Authored by
Please commit the spelling corrections in lib/Analysis/MemorySSA.cpp separately.
This looks right, but I'm not that familiar with the algorithm; hopefully Daniel will chime in.
Thanks for the patch!
Just one nit (inline) and a general question: is this new set meant to persist across multiple updates, should the erase in fixupDefs be taking care of everything added in a given query, or should we be clearing it at some point?
(If the answer is "the middle one," would it be easy to assert that the def is empty somewhere?)
At least two GVN-hoist test cases need NonOptPhis be cleared. The patch is scoped at per call of MemorySSAUpdater::moveTo(), so clean-up is placed at the end of this function.