After cd8aa234, there's no need to collect a vector of basic blocks to keep first. Remove the first loop.