Avoid using BasicBlock::getInstList directly in a few places.