This PR adds loop iteration estimates for simple incrementing loops. It only peels loops that run for two iterations maximum, and it fully peels these loops. To peel more complex loops we could consider doing something smarter like llvm. Peeling more than two iterations (i.e. by putting the ruleset in normal optimizations rather than expensive optimizations) blows up for nested loops.
This PR adds loop iteration estimates for simple incrementing loops. It only peels loops that run for two iterations maximum, and it fully peels these loops. To peel more complex loops we could consider doing something smarter like llvm. Peeling more than two iterations (i.e. by putting the ruleset in normal optimizations rather than expensive optimizations) blows up for nested loops.