[polly] r263678 - ScopInfo: Do not generate dependences for i1 values used in affine branches
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 16:33:54 PDT 2016
Author: grosser
Date: Wed Mar 16 18:33:54 2016
New Revision: 263678
URL: http://llvm.org/viewvc/llvm-project?rev=263678&view=rev
Log:
ScopInfo: Do not generate dependences for i1 values used in affine branches
Affine branches are fully modeled and regenerated from the polyhedral domain and
consequently do not require any input conditions to be propagated.
Modified:
polly/trunk/lib/Analysis/ScopInfo.cpp
polly/trunk/test/ScopInfo/invariant-loads-leave-read-only-statements.ll
polly/trunk/test/ScopInfo/scalar_dependence_cond_br.ll
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=263678&r1=263677&r2=263678&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Mar 16 18:33:54 2016
@@ -4148,8 +4148,13 @@ void ScopInfo::buildAccessFunctions(Regi
if (isIgnoredIntrinsic(&Inst))
continue;
- if (!PHI)
+ // PHI nodes have already been modeled above and TerminatorInsts that are
+ // not part of a non-affine subregion are fully modeled and regenerated
+ // from the polyhedral domains. Hence, they do not need to be modeled as
+ // explicit data dependences.
+ if (!PHI && (!isa<TerminatorInst>(&Inst) || NonAffineSubRegion))
buildScalarDependences(&Inst);
+
if (!IsExitBlock)
buildEscapingDependences(&Inst);
}
Modified: polly/trunk/test/ScopInfo/invariant-loads-leave-read-only-statements.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/invariant-loads-leave-read-only-statements.ll?rev=263678&r1=263677&r2=263678&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/invariant-loads-leave-read-only-statements.ll (original)
+++ polly/trunk/test/ScopInfo/invariant-loads-leave-read-only-statements.ll Wed Mar 16 18:33:54 2016
@@ -8,8 +8,6 @@
; CHECK-NEXT: Schedule :=
; CHECK-NEXT: [p_0, p_1, p_2] -> { Stmt_top_split[] -> [0, 0, 0, 0] };
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
-; CHECK-NEXT: [p_0, p_1, p_2] -> { Stmt_top_split[] -> MemRef_26[] };
-; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
; CHECK-NEXT: [p_0, p_1, p_2] -> { Stmt_top_split[] -> MemRef_25[] };
; CHECK-NEXT: Stmt_L_4
; CHECK-NEXT: Domain :=
Modified: polly/trunk/test/ScopInfo/scalar_dependence_cond_br.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/scalar_dependence_cond_br.ll?rev=263678&r1=263677&r2=263678&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/scalar_dependence_cond_br.ll (original)
+++ polly/trunk/test/ScopInfo/scalar_dependence_cond_br.ll Wed Mar 16 18:33:54 2016
@@ -6,13 +6,12 @@
; A[i]++;
; }
;
-; FIXME: This test is a negative test until we have an independent blocks alternative.
+; Verify that we do not generate a value write access for the use of %cmp1 in
+; the branch condition. As _affine_ branches are fully modeled and regenerated
+; from the polyhedral information we do not need this value to be available
+; during code generation.
;
-; We should move operands as close to their use as possible, hence in this case
-; there should not be any scalar dependence anymore after %cmp1 is moved to
-; %for.body (%c and %indvar.iv are synthesis able).
-;
-; CHECK: [Scalar: 1]
+; CHECK-NOT: Stmt_for_cond[i0] -> MemRef_cmp1[] }
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
More information about the llvm-commits
mailing list