This is a cleanup/modernization patch requested in D144045 to make loop analysis a proper optional parameter to the pass rather than a semi-arbitrary value inherited via the pass pipeline.
It's a bit more complicated than the recent patch I started copying from (D143980) because InstCombine already has an option for MaxIterations (added with D71145).
I debated just deleting that option, but it was used by a pair of existing tests, so I put it into a struct (code largely copied from SimplifyCFG's implementation) to make the code more flexible for future options enhancements.
I didn't alter the pass manager invocations of InstCombine in this patch because the patch was already getting big, but that could be a small follow-up.
This should be initialized to nullptr. We should not use LoopInfo unless UseLoopInfo is set.