[PATCH][DAG] Teach DAG to also reassociate vector operations

Juergen Ributzka juergen at apple.com
Mon Jan 13 13:55:32 PST 2014


Hi Andrea,

I committed a refactored DAGCombiner code in r199146.

Cheers,
Juergen

On Jan 13, 2014, at 1:00 PM, Juergen Ributzka <juergen at apple.com> wrote:

> Hi Andrea,
> 
> thanks for reviewing the patch. I had it in my attic for a while, so I missed the recent isBuildVectorOfConstantSDNodes addition.
> I committed it in r199135.
> 
> Cheers,
> Juergen
> 
> On Jan 11, 2014, at 4:59 AM, Andrea Di Biagio <andrea.dibiagio at gmail.com> wrote:
> 
>> Hi Juergen,
>> Your patch LGTM!
>> 
>> I noticed that method BuildVectorSDNode::isConstant() does something
>> very similar to function ISD::isBuildVectorOfConstantSDNodes (in
>> include/llvm/CodeGen/SelectionDAGNodes.h); the only difference is that
>> your new method also accepts build_vector of ConstantFPSDNode.
>> At the moment, function ISD::isBuildVectorOfConstantSDNodes returns
>> true only if the node in input is a build_vectors of ConstantSDNodes
>> or UNDEFs; that behavior can be changed in the future and some of the
>> code in DAGCombiner.cpp could be further simplified. But for now I
>> think using method BuildVectorSDNode::isConstant() is ok!.
>> 
>> Thanks,
>> Andrea Di Biagio
>> 
>> On Sat, Jan 11, 2014 at 12:14 AM, Juergen Ributzka <juergen at apple.com> wrote:
>>> ping
>>> 
>>> On Jan 2, 2014, at 9:06 PM, Juergen Ributzka <juergen at apple.com> wrote:
>>> 
>>>> Hi @ll,
>>>> 
>>>> this small patch teaches DAG to reassociate vector ops, which in turn enables constant folding of vector op chains that e.g. appear during X86 custom lowering and DAG combine.
>>>> 
>>>> Cheers,
>>>> Juergen
>>>> 
>>>> <0001-DAG-Teach-DAG-to-also-reassociate-vector-operations.patch>
>>> 
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> _______________________________________________
> 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