visit will skip visiting instructions it already has visited to avoid issues with cycles in the data graph. However, the result of this skipping behavior is that if we encounter the same instruction twice, and that instruction has a well defined result and isn't part of a cycle, we will introduce unknowns into the analysis even though we knew the size and offset of the instruction's result. Instead of skipping such instructions, keep a cache of the result of visiting them. This result is initialized to unknown() before visiting, so if we happen to visit it again recursively (perhaps as the result of a cycle or a phi), we will get unknown as the cached result and exit out.
50 KiB
50 KiB