This is an archive of the discontinued LLVM Phabricator instance.

LazyValueInfo: Actually re-visit partially solved block-values in solveBlockValue()
ClosedPublic

Authored by hans on Nov 24 2014, 4:03 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

hans updated this revision to Diff 16588.Nov 24 2014, 4:03 PM
hans retitled this revision from to LazyValueInfo: Actually re-visit partially solved block-values in solveBlockValue().
hans updated this object.
hans edited the test plan for this revision. (Show Details)
hans added subscribers: Unknown Object (MLST), hansw, hfinkel, Jiangning.
pete added a reviewer: pete.Nov 24 2014, 7:41 PM
pete added a subscriber: pete.

Added myself as a reviewer

pete accepted this revision.Nov 24 2014, 7:44 PM
pete edited edge metadata.

LGTM.

Nice performance improvement! i saw about 0.08% improvement in llc size with this which is good too.

This revision is now accepted and ready to land.Nov 24 2014, 7:44 PM
hans closed this revision.Nov 25 2014, 9:23 AM
hans updated this revision to Diff 16628.

Closed by commit rL222768 (authored by @hans).