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

Jim Grosbach grosbach at apple.com
Wed Sep 5 17:32:05 PDT 2012


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




More information about the llvm-commits mailing list