[polly] r212080 - [FIX] Don't consider reductions which are partially outside the SCoP

Tobias Grosser tobias at grosser.es
Wed Jul 2 09:42:28 PDT 2014


On 01/07/2014 02:32, Johannes Doerfert wrote:
> Author: jdoerfert
> Date: Mon Jun 30 19:32:29 2014
> New Revision: 212080
>
> URL: http://llvm.org/viewvc/llvm-project?rev=212080&view=rev
> Log:
> [FIX] Don't consider reductions which are partially outside the SCoP
>
>    + Test case
>
> Added:
>      polly/trunk/test/ScopInfo/reduction_chain_partially_outside_the_scop.ll
> Modified:
>      polly/trunk/lib/Analysis/ScopInfo.cpp
>
> Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=212080&r1=212079&r2=212080&view=diff
> ==============================================================================
> --- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
> +++ polly/trunk/lib/Analysis/ScopInfo.cpp Mon Jun 30 19:32:29 2014
> @@ -732,6 +732,10 @@ void ScopStmt::collectCandiateReductionL
>     if (!BinOp->isCommutative() || !BinOp->isAssociative())
>       return;
>
> +  // Skip if the binary operator is outside the current SCoP
> +  if (BinOp->getParent() != Store->getParent())
> +    return;


You check here the equality of the BasicBlock, not the SCoP. I think 
this is correct, but the comment is then inconsistent and needs to be fixed.

Thanks,
Tobias



More information about the llvm-commits mailing list