[PATCH] D96647: [BasicAA] Add depth limit

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 13 13:29:42 PST 2021


nikic added a comment.

@lebedev.ri As mentioned in the summary, this is not just about stack overflows, but also about exponential queries, with an eye on D92401 <https://reviews.llvm.org/D92401>. The restriction on phi-of-phis without PhiValues analysis is also something that may be relaxed if we have sensible cutoffs. I would expect those things to be much more valuable in terms of analysis power than the ability to handle very deep queries.

Though now that I think on it, it might make more sense to restrict the total number of recursive queries rather than the query depth in particular, which could allow either a deep linear query, or a shallow branching one.

If we want to address stack overflows only (which may well make sense as an intermediate step), then it would probably be good enough to introduce a cutoff at a very high depth (like 512) and not bother with BatchAA consistency at all. The problematic test case reaches a maximum depth of 2507, which is a bit excessive :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96647/new/

https://reviews.llvm.org/D96647



More information about the llvm-commits mailing list