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
- Build Status
Buildable 28021 Build 28020: arc lint + arc unit
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 | 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 | 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 | 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 | SGTM |
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)