[llvm-commits] patch: make LazyValueInfo non-recursive

Nick Lewycky nlewycky at google.com
Thu Dec 16 16:22:54 PST 2010


This patch removes all recursion from LazyValueInfo by breaking it up into
five queues and many helper functions. In this patch
 * getValue{InBlock,OnEdge} are now purely externally facing and their
short-circuit cases were sunk
 * getEdgeValue was cloned into hasEdgeValue which has the surprising
side-effect of queueing the blocks we need in order to solve the edge (if
applicable)
 * Having both hasEdgeValue and getEdgeValue means that we use pred_iterator
twice instead of once per edge query. In exchange, I rigged the
getBlockValue queries on PHINodes to use the phi node's list of predecessors
directly instead of pred_iterator.
 * getBlockValue now does a retrieval of the cached value and nothing more,
the compute was broken into four solveBlockValue* methods.

The good news is that it passes make check, a nightly test, and my own
internal testcase (yay!). Please review!

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101216/15e3660b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvi-2.patch
Type: text/x-patch
Size: 21668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101216/15e3660b/attachment.bin>


More information about the llvm-commits mailing list