[llvm-commits] [PATCH] Improve codegen for non-constant BUILD_VECTORs on ARM

James Molloy James.Molloy at arm.com
Thu Sep 6 02:47:18 PDT 2012


Hi Jim,

Thanks! Comments acted upon and committed in r163301.

Cheers,

James

On Thu, 2012-09-06 at 01:32 +0100, Jim Grosbach wrote:
> Some lines exceed 80 columns and/or have trailing whitespace.
>
> +  std::map<SDValue, int> ValueCounts;
>
> This seems a pretty good use-case for a DenseMap.
>
> Other than that, this looks great and is good to go. Thanks!
>
> -Jim
>
>
> On Sep 3, 2012, at 1:29 AM, James Molloy <James.Molloy at arm.com> wrote:
>
> > Hi,
> >
> > Currently if a BUILD_VECTOR is all constants but isn't a constant splat,
> > a chain of insertelements is created from undef.
> >
> > However in some cases it may be profitable to start from a different
> > base; consider "<5, 5, 6, 5>". This would be more profitable to start
> > from a base of a constant splat of "5", then mutate the third lane to
> > "6".
> >
> > The attached patch implements this, by searching for a "dominant"
> > constant value in the vector. A dominant value is defined as a value
> > that is present in more than half the lanes.
> >
> > Please review.
> >
> > Cheers,
> >
> > James<nonconstant_splats.diff>_______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.




More information about the llvm-commits mailing list