[PATCH] D120510: [clang][dataflow] Add limits to size of modeled data structures in environment.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 24 12:36:58 PST 2022


ymandel added a comment.

In D120510#3343935 <https://reviews.llvm.org/D120510#3343935>, @xazax.hun wrote:

>> Very large structs still ground the analysis to a halt.
>
> I had similar experience in the past with analyses that tried to represent all values in structs eagerly.
>
> I think a better approach in general to make it as lazy as possible, so if a function does not access a field, never construct a representation for that in the memory.
>
> This patch looks good and we will likely see the need for such limits even with a lazy system to handle certain code patterns. Are there any plans to make this more lazy in the future?

Yes! Exactly as you mention, we're planning two approaches:

1. Scan the AST of the function body and build the set of accessed fields. That will be consulted as a filter during construction.
2. Support lazy construction. The problem we have is that we're not sure how to ensure that the "thunk" is shared between the "many worlds" that is the forking copies of the environments. We need to ensure that once the value is created lazily in one copy, it's visible in all others.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120510



More information about the cfe-commits mailing list