[PATCH] LazyValueInfo: Actually re-visit partially solved block-values in solveBlockValue()

Hans Wennborg hans at chromium.org
Mon Nov 24 16:05:50 PST 2014


+Pete Cooper whom I couldn't find in the Phabricator interface.

On Mon, Nov 24, 2014 at 4:03 PM, Hans Wennborg <hans at chromium.org> wrote:
> If solveBlockValue() needs results from predecessors that are not already computed, it returns false with the intention of resuming when the dependencies have been resolved. However, the computation would never be resumed since an 'overdefined' result had been placed in the cache, preventing any further computation.
>
> The point of placing the 'overdefined' result in the cache seems to have been to break cycles, but we can check for that when inserting work items in the BlockValue stack instead. This makes the "stop and resume" mechanism of solveBlockValue() work as intended, unlocking more analysis.
>
> Using this patch shaves 120 KB off a 64-bit Chromium build on Linux.
>
> I benchmarked compiling bzip2.c at -O2 but couldn't measure any compile-time difference.
>
> Tests by Jiangning Liu from r215343 / PR21238, Pete Cooper, and me.
>
> http://reviews.llvm.org/D6397
>
> Files:
>   lib/Analysis/LazyValueInfo.cpp
>   test/Transforms/CorrelatedValuePropagation/icmp.ll
>   test/Transforms/JumpThreading/conservative-lvi.ll




More information about the llvm-commits mailing list