egraphs-good / eggcc

MIT License
42 stars 8 forks source link

Add loop iteration estimates for basic loops and peel more #606

Closed kirstenmg closed 4 months ago

kirstenmg commented 4 months ago

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.