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

Nick Lewycky nlewycky at google.com
Fri Dec 17 16:30:06 PST 2010


This is an updated version of the patch per Owen's review:
 * all queues merged into one block queue!
 * the two pred_iterator walks folded back into one. Win!
 * hasEdgeValue removed. getEdgeValue will now enqueue blocks as needed.

Nick

On 16 December 2010 16:22, Nick Lewycky <nlewycky at google.com> wrote:

> 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/20101217/7260a4e0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvi-2-4.patch
Type: text/x-patch
Size: 19725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101217/7260a4e0/attachment.bin>


More information about the llvm-commits mailing list