Some transformation in CodeGenPrepare pass may create and/or delete
basic block, but they don't update the LoopInfo, so the LoopInfo may
end up containing dangling pointers and sometimes reused basic blocks,
which leads to "interesting" non-deterministic behaviour.
This patch makes the pass invalidate the LoopInfo whenever the
DominationTree is invalidated and lazily rebuilds it.
InitialLI is pointless if you're going to immediately throw it away.