Before elimination of mostly empty block it makes sense to remove dead PHI nodes.
It open more opportunity for elimination plus eliminates dead code itself.
It appeared that change results in failing many unit tests and some of them I've updated
and for another one I disable this optimization.
The pattern I observed in the tests is that there is a infinite loop without side effects.
As a result after elimination of dead phi node all other related instruction are also removed and
tests stops to check what it is expected.
I guess it is due to test is obtained by bugpoint.
I've added people related to these tests to check whether they are ok with update of the tests.