[llvm] [SCEV] Use loop guards when checking that RHS >= Start (PR #75039)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 07:15:56 PST 2023


nikic wrote:

> LGTM, thanks assuming the compile-time impact isn't too bad!
> 
> Using loop guards throughout the various `howMany*` would probably be beneficial in general, but that would probably need some sort of caching of the collected conds to keep compile-time impact low

It looks like there isn't any significant impact: http://llvm-compile-time-tracker.com/compare.php?from=18959c46e3ced1f7ad12a82e9f30bafe9d1f1733&to=fac70f5663ff8f7e87a019603e0e1879110e9772&stat=instructions:u

I think BECount calculation is generally not very compile-time sensitive (as it's once per loop), so we can likely be fairly liberal with use of loop guards in there.

https://github.com/llvm/llvm-project/pull/75039


More information about the llvm-commits mailing list