This is an archive of the discontinued LLVM Phabricator instance.

{StaticAnalyzer} LoopUnrolling: Keep track the maximum number of steps for each loop
ClosedPublic

Authored by szepet on Aug 26 2017, 8:10 AM.

Details

Summary

This way the unrolling can be restricted for loops which will take at most a given number of steps. It is defined as 128 in this patch and it seems to have a good number for that purpose.

Diff Detail

Repository
rL LLVM

Event Timeline

szepet created this revision.Aug 26 2017, 8:10 AM
NoQ edited edge metadata.Aug 28 2017, 1:54 AM

LGTM, thanks! Minor nit included. I hope our matchers actually cover all the cases (not a big deal if they don't though).

lib/StaticAnalyzer/Core/LoopUnrolling.cpp
26 ↗(On Diff #112789)

I'd prefer a (static) const int, dealing preprocessor doesn't seem to be necessary here.

szepet updated this revision to Diff 112866.Aug 28 2017, 2:57 AM
szepet marked an inline comment as done.

Updated to use static int.

NoQ accepted this revision.Aug 28 2017, 3:39 AM
This revision is now accepted and ready to land.Aug 28 2017, 3:39 AM
This revision was automatically updated to reflect the committed changes.