diff --git a/polly/lib/Analysis/TempScopInfo.cpp b/polly/lib/Analysis/TempScopInfo.cpp index 06455ce02cf7..1ec194e59af7 100644 --- a/polly/lib/Analysis/TempScopInfo.cpp +++ b/polly/lib/Analysis/TempScopInfo.cpp @@ -283,13 +283,6 @@ void TempScopInfo::buildLoopBounds(TempScop &Scop) { const SCEV *BackedgeTakenCount = SE->getBackedgeTakenCount(L); LoopBounds[L] = BackedgeTakenCount; - // FIXME: Do not build TempSCEVAffFunc. It is not needed anywhere else - // and only build to register the parameters in this SCoP. We should - // move this functionality to the ScopDetection. - SCEVAffFunc Temp(SCEVAffFunc::Eq, BackedgeTakenCount); - buildAffineFunction(BackedgeTakenCount, Temp, Scop.getMaxRegion(), - Scop.getParamSet()); - Loop *OL = R.outermostLoopInRegion(L); unsigned LoopDepth = L->getLoopDepth() - OL->getLoopDepth() + 1; diff --git a/polly/test/ScopInfo/bad_loop_1.ll b/polly/test/ScopInfo/bad_loop_1.ll deleted file mode 100644 index e5421e09c575..000000000000 --- a/polly/test/ScopInfo/bad_loop_1.ll +++ /dev/null @@ -1,56 +0,0 @@ -; RUN: opt %loadPolly %defaultOpts -polly-analyze-ir -analyze %s | FileCheck %s -check-prefix=INDVAR -; RUN: opt %loadPolly %defaultOpts -polly-analyze-ir -analyze %s | FileCheck %s - -;void f(long a[][128], long N, long M) { -; long i, j; -; for (j = 0; j < rnd(); ++j) -; for (i = 0; i < N; ++i) -; a[i][j] = 0; -;} - -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" -target triple = "x86_64-unknown-linux-gnu" - -define void @f([128 x i64]* nocapture %a, i64 %N, i64 %M) nounwind { -entry: - %0 = tail call i64 (...)* @rnd() nounwind ; [#uses=1] - %1 = icmp sgt i64 %0, 0 ; [#uses=1] - br i1 %1, label %bb.nph8, label %return - -bb.nph8: ; preds = %entry - %2 = icmp sgt i64 %N, 0 ; [#uses=1] - br i1 %2, label %bb2.preheader.us, label %bb2.preheader - -bb2.preheader.us: ; preds = %bb2.bb3_crit_edge.us, %bb.nph8 - %3 = phi i64 [ 0, %bb.nph8 ], [ %tmp, %bb2.bb3_crit_edge.us ] ; [#uses=2] - %tmp = add i64 %3, 1 ; [#uses=2] - br label %bb1.us - -bb1.us: ; preds = %bb1.us, %bb2.preheader.us - %i.06.us = phi i64 [ 0, %bb2.preheader.us ], [ %4, %bb1.us ] ; [#uses=2] - %scevgep = getelementptr [128 x i64]* %a, i64 %i.06.us, i64 %3 ; [#uses=1] - store i64 0, i64* %scevgep, align 8 - %4 = add nsw i64 %i.06.us, 1 ; [#uses=2] - %exitcond = icmp eq i64 %4, %N ; [#uses=1] - br i1 %exitcond, label %bb2.bb3_crit_edge.us, label %bb1.us - -bb2.bb3_crit_edge.us: ; preds = %bb1.us - %5 = tail call i64 (...)* @rnd() nounwind ; [#uses=1] - %6 = icmp sgt i64 %5, %tmp ; [#uses=1] - br i1 %6, label %bb2.preheader.us, label %return - -bb2.preheader: ; preds = %bb2.preheader, %bb.nph8 - %j.07 = phi i64 [ %tmp9, %bb2.preheader ], [ 0, %bb.nph8 ] ; [#uses=1] - %tmp9 = add i64 %j.07, 1 ; [#uses=2] - %7 = tail call i64 (...)* @rnd() nounwind ; [#uses=1] - %8 = icmp sgt i64 %7, %tmp9 ; [#uses=1] - br i1 %8, label %bb2.preheader, label %return - -return: ; preds = %bb2.preheader, %bb2.bb3_crit_edge.us, %entry - ret void -} - -declare i64 @rnd(...) - -; INDVAR: Scop: bb1.us => bb2.bb3_crit_edge.us Parameters: (%N, {0,+,1}<%bb2.preheader.us>, ), Max Loop Depth: 1 -; CHECK: Scop: bb1.us => bb2.bb3_crit_edge.us Parameters: (%N, {0,+,1}<%bb2.preheader.us>, ), Max Loop Depth: 1 diff --git a/polly/test/ScopInfo/nest_loop_0.ll b/polly/test/ScopInfo/nest_loop_0.ll deleted file mode 100644 index 1a6ce2cbcefd..000000000000 --- a/polly/test/ScopInfo/nest_loop_0.ll +++ /dev/null @@ -1,42 +0,0 @@ -; RUN: opt %loadPolly %defaultOpts -polly-analyze-ir -analyze %s | FileCheck %s - -;void f(long a[][128], long N, long M) { -; long i, j; -; for (j = 0; j < M; ++j) -; for (i = 0; i < N; ++i) -; ... -;} - -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" -target triple = "x86_64-unknown-linux-gnu" - -define void @f([128 x i64]* nocapture %a, i64 %N, i64 %M) nounwind { -entry: - %0 = icmp sgt i64 %M, 0 ; [#uses=1] - %1 = icmp sgt i64 %N, 0 ; [#uses=1] - %or.cond = and i1 %0, %1 ; [#uses=1] - br i1 %or.cond, label %bb2.preheader, label %return - -bb1: ; preds = %bb2.preheader, %bb1 - %i.06 = phi i64 [ 0, %bb2.preheader ], [ %2, %bb1 ] ; [#uses=3] - %scevgep = getelementptr [128 x i64]* %a, i64 %i.06, i64 %4 ; [#uses=1] - %tmp = add i64 %i.06, %N ; [#uses=1] - store i64 %tmp, i64* %scevgep, align 8 - %2 = add nsw i64 %i.06, 1 ; [#uses=2] - %exitcond = icmp eq i64 %2, %N ; [#uses=1] - br i1 %exitcond, label %bb3, label %bb1 - -bb3: ; preds = %bb1 - %3 = add i64 %4, 1 ; [#uses=2] - %exitcond9 = icmp eq i64 %3, %M ; [#uses=1] - br i1 %exitcond9, label %return, label %bb2.preheader - -bb2.preheader: ; preds = %bb3, %entry - %4 = phi i64 [ %3, %bb3 ], [ 0, %entry ] ; [#uses=2] - br label %bb1 - -return: ; preds = %bb3, %entry - ret void -} - -; CHECK: Scop: bb2.preheader => return.single_exit Parameters: (%M, %N, ), Max Loop Depth: 2 diff --git a/polly/test/ScopInfo/static_known_0.ll b/polly/test/ScopInfo/static_known_0.ll deleted file mode 100644 index 0435d5094bfd..000000000000 --- a/polly/test/ScopInfo/static_known_0.ll +++ /dev/null @@ -1,39 +0,0 @@ -; RUN: opt %loadPolly %defaultOpts -polly-analyze-ir -analyze %s | FileCheck %s - - -;void f(long a[], long N) { -; long M = rnd(); -; long i; - -; for (i = 0; i < M; ++i) -; a[i] = i; - -; a[N] = 0; -;} - -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" -target triple = "x86_64-unknown-linux-gnu" - -define void @f(i64* nocapture %a, i64 %N) nounwind { -entry: - %0 = tail call i64 (...)* @rnd() nounwind ; [#uses=2] - %1 = icmp sgt i64 %0, 0 ; [#uses=1] - br i1 %1, label %bb, label %bb2 - -bb: ; preds = %bb, %entry - %2 = phi i64 [ 0, %entry ], [ %3, %bb ] ; [#uses=3] - %scevgep = getelementptr i64* %a, i64 %2 ; [#uses=1] - store i64 %2, i64* %scevgep, align 8 - %3 = add nsw i64 %2, 1 ; [#uses=2] - %exitcond = icmp eq i64 %3, %0 ; [#uses=1] - br i1 %exitcond, label %bb2, label %bb - -bb2: ; preds = %bb, %entry - %4 = getelementptr inbounds i64* %a, i64 %N ; [#uses=1] - store i64 0, i64* %4, align 8 - ret void -} - -declare i64 @rnd(...) - -; CHECK: Scop: bb => bb2.single_exit Parameters: (%0, ), Max Loop Depth: 1