TempScopInfo: Remove unneeded construction of SCEVAffFunc

llvm-svn: 144220
This commit is contained in:
Tobias Grosser 2011-11-09 22:34:18 +00:00
parent 53218b6fcc
commit e6efa37e76
4 changed files with 0 additions and 144 deletions

View File

@ -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;

View File

@ -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 ; <i64> [#uses=1]
%1 = icmp sgt i64 %0, 0 ; <i1> [#uses=1]
br i1 %1, label %bb.nph8, label %return
bb.nph8: ; preds = %entry
%2 = icmp sgt i64 %N, 0 ; <i1> [#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 ] ; <i64> [#uses=2]
%tmp = add i64 %3, 1 ; <i64> [#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 ] ; <i64> [#uses=2]
%scevgep = getelementptr [128 x i64]* %a, i64 %i.06.us, i64 %3 ; <i64*> [#uses=1]
store i64 0, i64* %scevgep, align 8
%4 = add nsw i64 %i.06.us, 1 ; <i64> [#uses=2]
%exitcond = icmp eq i64 %4, %N ; <i1> [#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 ; <i64> [#uses=1]
%6 = icmp sgt i64 %5, %tmp ; <i1> [#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 ] ; <i64> [#uses=1]
%tmp9 = add i64 %j.07, 1 ; <i64> [#uses=2]
%7 = tail call i64 (...)* @rnd() nounwind ; <i64> [#uses=1]
%8 = icmp sgt i64 %7, %tmp9 ; <i1> [#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

View File

@ -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 ; <i1> [#uses=1]
%1 = icmp sgt i64 %N, 0 ; <i1> [#uses=1]
%or.cond = and i1 %0, %1 ; <i1> [#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 ] ; <i64> [#uses=3]
%scevgep = getelementptr [128 x i64]* %a, i64 %i.06, i64 %4 ; <i64*> [#uses=1]
%tmp = add i64 %i.06, %N ; <i64> [#uses=1]
store i64 %tmp, i64* %scevgep, align 8
%2 = add nsw i64 %i.06, 1 ; <i64> [#uses=2]
%exitcond = icmp eq i64 %2, %N ; <i1> [#uses=1]
br i1 %exitcond, label %bb3, label %bb1
bb3: ; preds = %bb1
%3 = add i64 %4, 1 ; <i64> [#uses=2]
%exitcond9 = icmp eq i64 %3, %M ; <i1> [#uses=1]
br i1 %exitcond9, label %return, label %bb2.preheader
bb2.preheader: ; preds = %bb3, %entry
%4 = phi i64 [ %3, %bb3 ], [ 0, %entry ] ; <i64> [#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

View File

@ -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 ; <i64> [#uses=2]
%1 = icmp sgt i64 %0, 0 ; <i1> [#uses=1]
br i1 %1, label %bb, label %bb2
bb: ; preds = %bb, %entry
%2 = phi i64 [ 0, %entry ], [ %3, %bb ] ; <i64> [#uses=3]
%scevgep = getelementptr i64* %a, i64 %2 ; <i64*> [#uses=1]
store i64 %2, i64* %scevgep, align 8
%3 = add nsw i64 %2, 1 ; <i64> [#uses=2]
%exitcond = icmp eq i64 %3, %0 ; <i1> [#uses=1]
br i1 %exitcond, label %bb2, label %bb
bb2: ; preds = %bb, %entry
%4 = getelementptr inbounds i64* %a, i64 %N ; <i64*> [#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