[llvm] Remove value cache in SCEV comparator. (PR #100721)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 07:52:40 PDT 2024


nikic wrote:

I've been looking into this, and think that this is not quite the right fix for the issue. I've put up an alternative at https://github.com/llvm/llvm-project/pull/101022. CompareSCEVComplexity was already returning nullopt when hitting the depth limit, but CompareValueComplexity wasn't. I think it we just drop the EqCache at the Value level, we might still run into a similar issue with the higher level cache at the SCEV level.

I do think that removing the cache is still a good idea independent of the strict weak ordering issue though. Based on my measurements, removing it improves compile-time. And given the very low depth limit involved here, I don't think we need to worry about regressing any degenerate cases either.

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


More information about the llvm-commits mailing list