[polly] r281234 - Store the size of the outermost dimension in case of newly created arrays that require memory allocation.

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 02:07:23 PDT 2016


On 09/12, Roman Gareev via llvm-commits wrote:
> Author: romangareev
> Date: Mon Sep 12 12:08:31 2016
> New Revision: 281234
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=281234&view=rev
> Log:
> Store the size of the outermost dimension in case of newly created arrays that require memory allocation.
> 
> We do not need the size of the outermost dimension in most cases, but if we
> allocate memory for newly created arrays, that size is needed.
> 
> Reviewed-by: Michael Kruse <llvm at meinersbur.de>
> 
> Differential Revision: https://reviews.llvm.org/D23991

[cut]

> 
> -  for (int i = 0; i < SharedDims; i++)
> -    if (NewSizes[i + ExtraDimsNew] != DimensionSizes[i + ExtraDimsOld])
> +
> +  for (int i = 0; i < SharedDims; i++) {
> +    auto &NewSize = NewSizes[i + ExtraDimsNew];
> +    auto &KnownSize = DimensionSizes[i + ExtraDimsOld];
> +    if (NewSize && KnownSize && NewSize != KnownSize)
>        return false;
> +  }
Why do you take references of SCEV pointers here? That is not necessary
and confusing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160913/a0628ed7/attachment.sig>


More information about the llvm-commits mailing list