[llvm-commits] [PATCH] AndOrXor Chain Optimization

Chris Lattner clattner at apple.com
Wed Aug 17 11:40:31 PDT 2011


On Aug 16, 2011, at 3:47 PM, Eli Friedman wrote:

> 2011/8/16 Daniel Nicácio <dnicacios at gmail.com>:
>> ping
>> Updated patch with revision 137728
> 
> This is a lot of code for a rather obscure optimization; I don't see
> how it is worthwhile.

I agree.  Does this actually speed up a known program, or is this just a theoretical exercise?

-Chris

> -Eli
> 
>> 2011/8/5 Daniel Nicácio <dnicacios at gmail.com>
>>> 
>>> New unified diff file attached.
>>> Daniel Nicacio
>>> 
>>> 2011/8/4 Eli Friedman <eli.friedman at gmail.com>
>>>> 
>>>> 2011/8/4 Daniel Nicácio <dnicacios at gmail.com>
>>>>> 
>>>>> Hi, this patch increments the instcombiner pass.
>>>>> It adds a new XOR, OR, AND optimization, trying to find a chain of
>>>>> logical instructions (xor, and, or) operating on different bits of the same
>>>>> word. If this chain is found, it is collapsed into a single logical
>>>>> instruction.
>>>>> The figure below shows a generic example:
>>>>> Any comments and critics are welcome.
>>>> 
>>>> Please attach a single diff containing all the changes, and please use
>>>> "svn diff" or some other tool that makes a unified diff.
>>>> -Eli
>> 
>> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list