mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 00:20:25 +08:00
ScheduleOptimizer: Do not get dependences, if we do not calculate a schedule
This solves the 'isl_ctx freed, but some objects still reference it' problem reported in PR12276. llvm-svn: 152917
This commit is contained in:
@@ -447,13 +447,14 @@ bool IslScheduleOptimizer::runOnScop(Scop &S) {
|
||||
}
|
||||
|
||||
|
||||
isl_union_map *Validity = D->getDependences(ValidityKinds);
|
||||
isl_union_map *Proximity = D->getDependences(ProximityKinds);
|
||||
isl_union_set *Domain = S.getDomains();
|
||||
|
||||
if (!Domain)
|
||||
return false;
|
||||
|
||||
isl_union_map *Validity = D->getDependences(ValidityKinds);
|
||||
isl_union_map *Proximity = D->getDependences(ProximityKinds);
|
||||
|
||||
// Simplify the dependences by removing the constraints introduced by the
|
||||
// domains. This can speed up the scheduling time significantly, as large
|
||||
// constant coefficients will be removed from the dependences. The
|
||||
|
||||
17
polly/test/ScheduleOptimizer/2012-03-16-Empty-Domain.ll
Normal file
17
polly/test/ScheduleOptimizer/2012-03-16-Empty-Domain.ll
Normal file
@@ -0,0 +1,17 @@
|
||||
; RUN: opt %loadPolly -polly-opt-isl -S %s
|
||||
target datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32f64:64:64-f32:32:32-a0:0-n32"
|
||||
target triple = "hexagon-unknown-linux-gnu"
|
||||
|
||||
define void @sdbout_label() nounwind {
|
||||
entry:
|
||||
br label %for.cond
|
||||
|
||||
for.cond: ; preds = %for.cond, %entry
|
||||
%0 = phi i32 [ 0, %entry ], [ %1, %for.cond ]
|
||||
%1 = add nsw i32 %0, 1
|
||||
%exitcond72 = icmp eq i32 %1, 7
|
||||
br i1 %exitcond72, label %sw.epilog66, label %for.cond
|
||||
|
||||
sw.epilog66: ; preds = %for.cond
|
||||
ret void
|
||||
}
|
||||
Reference in New Issue
Block a user