Use DomTree in MachineSink to sink over diamonds.
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Thu, 4 Dec 2014 10:36:42 +0000 (10:36 +0000)
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Thu, 4 Dec 2014 10:36:42 +0000 (10:36 +0000)
According to a previous FIXME comment we now not only look at MBB
successors, but also handle code sinking past them:

  x = computation
  if () {} else {}
  use x

The instruction could be sunk over the whole diamond for the
if/then/else (or loop, etc), allowing it to be sunk into other blocks
after that.

Modified test added in r204522, due to one spill less present.

Minor fixes in comments.

Patch provided by Jonas Paulsson. Reviewed by Hal Finkel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223350 91177308-0d34-0410-b5e6-96231b3b80d8


No differences found