Unlimitted number of calls to getClobberingAccess can lead to high
compile times in pathological cases.
Switching EnableLicmCap flag from bool to int, and enabling to default 100.
(tested to be appropriate for current bechmarks)
We can revisit this value when enabling MemorySSA.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I disregarded the possiblity of threading in the initial diff.
Updated to pass the counter as an argument.
Kindly re-review.
Thanks for this!
One currently-actionable nit from me
include/llvm/Transforms/Utils/LoopUtils.h | ||
---|---|---|
115 ↗ | (On Diff #186060) | Nit: I'm OK with this as is, but if we grow another MSSA-related optimization limit/counter, please wrap the MSSA-related bits into some sort of options struct (a bit in spirit like llvm::ObjectSizeOpts, but we'd also be tracking the mutable EnableLicmCapCounter/etc in it) |
lib/Transforms/Scalar/LICM.cpp | ||
119 ↗ | (On Diff #186060) | nit: enable sounds pretty bool-y for an int. Can we swap to licm-mssa-optimization-cap (or similar)? |
include/llvm/Transforms/Utils/LoopUtils.h | ||
---|---|---|
115 ↗ | (On Diff #186060) | Noted, and I agree! I considered adding this in this patch, actually. |
Deferring to Chandler's LGTM for the approach + first patch; changes since then LGTM.
Thanks again!
include/llvm/Transforms/Utils/LoopUtils.h | ||
---|---|---|
115 ↗ | (On Diff #186060) | SGTM |