[llvm-commits] [PATCH] Phi node folding improvements

Chris Lattner clattner at apple.com
Sun Sep 5 13:16:25 PDT 2010


On Jul 30, 2010, at 1:15 PM, Peter Collingbourne wrote:

> Hi,
> 
> The attached patches improve the flexibility of the phi node folding
> mechanism by assigning a cost to each non-trapping instruction and
> allowing the user to specify a maximum cost threshold.  By increasing
> the threshold the user can apply phi node folding to more complex
> expressions.
> 
> I developed this patch as part of my work with the Klee symbolic
> virtual machine, which can handle symbolic expressions containing
> selects more efficiently than branches conditional on symbolic
> expressions.  However I imagine it could also provide an advantage on
> architectures with relatively expensive branch operations (I haven't
> done any experiments to determine if this is the case though).
> 
> The patches should not contain any changes to default functionality,
> except for adding more instructions to the list of "cheap" (folded
> by default) instructions.

Hi Peter,

Sorry for the delay on this.  The first patch certainly looks ok, but we need testcases for each of these changes.

-Chris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-Trunc-ZExt-and-SExt-to-the-list-of-cheap-instruc.patch
Type: text/x-diff
Size: 927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100905/5a0a3d69/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-CostRemaining-parameter-to-DominatesMergePoint.patch
Type: text/x-diff
Size: 4957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100905/5a0a3d69/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Expose-phi-node-folding-cost-threshold-as-command-li.patch
Type: text/x-diff
Size: 1618 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100905/5a0a3d69/attachment-0002.patch>


More information about the llvm-commits mailing list