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 will be a small follow-up as noted with the TODO comment. Differential Revision: https://reviews.llvm.org/D144199
187 KiB
187 KiB