LoopReroller currently handles upto 16 iterations and this threshold is hardwired. Using a larger threshold will work, although if set to more than 25 or so the SmallBitVectors used will run slower. This patch exports -max-rerolled-iterations flag to the command line, to allow setting a larger (than 16) threshold if interested. Regretfully, couldn’t find a better way to keep the Iteration Limit constants neatly together as they were, and yet allow to override them.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Hi,
I think this is unnecessarily complex. Can't we just switch from a SmallBitVector to a BitVector and set IL_MaxIterations to 32? or do you need it larger than that?
James
Comment Actions
We can surely switch from a SmallBitVector to a BitVector and set IL_MaxIterations to 32, and that may indeed suite all current interests (and simplify the patch). But given externally adjustable thresholds like reroll-num-tolerated-failed-matches and max-reroll-increment it seems natural to allow resetting max-reroll-iterations externally as well, no?
Comment Actions
Yep, looks good, thanks!
Sorry I didn't reply to your previous comment. Essentially yes, I agree that tuning this on the command line would be nice. However, the way proposed made the code look ugly and less readable.
James