forked from OSchip/llvm-project
Do not enforce lcssa
At some point we enforced lcssa for the loop surrounding the entry block. This is not only questionable as it does not check any other loop but also not needed any more. llvm-svn: 253789
This commit is contained in:
parent
dec27df588
commit
a2a74f09fc
|
@ -84,8 +84,6 @@ enum RejectReasonKind {
|
|||
|
||||
rrkAlias,
|
||||
|
||||
rrkSimpleLoop,
|
||||
|
||||
// Other
|
||||
rrkOther,
|
||||
rrkIntToPtr,
|
||||
|
@ -616,24 +614,6 @@ public:
|
|||
//@}
|
||||
};
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// @brief Captures errors with non simplified loops.
|
||||
class ReportSimpleLoop : public RejectReason {
|
||||
//===--------------------------------------------------------------------===//
|
||||
public:
|
||||
ReportSimpleLoop();
|
||||
|
||||
/// @name LLVM-RTTI interface
|
||||
//@{
|
||||
static bool classof(const RejectReason *RR);
|
||||
//@}
|
||||
|
||||
/// @name RejectReason interface
|
||||
//@{
|
||||
virtual std::string getMessage() const override;
|
||||
//@}
|
||||
};
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// @brief Base class for otherwise ungrouped reject reasons.
|
||||
class ReportOther : public RejectReason {
|
||||
|
|
|
@ -1031,14 +1031,6 @@ bool ScopDetection::isValidRegion(DetectionContext &Context) const {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!CurRegion.getEnteringBlock()) {
|
||||
BasicBlock *entry = CurRegion.getEntry();
|
||||
Loop *L = LI->getLoopFor(entry);
|
||||
|
||||
if (L && !L->isLoopSimplifyForm())
|
||||
return invalid<ReportSimpleLoop>(Context, /*Assert=*/true);
|
||||
}
|
||||
|
||||
// SCoP cannot contain the entry block of the function, because we need
|
||||
// to insert alloca instruction there when translate scalar to array.
|
||||
if (CurRegion.getEntry() ==
|
||||
|
|
|
@ -44,7 +44,6 @@ BADSCOP_STAT(LoopBound, "Loop bounds can not be computed");
|
|||
BADSCOP_STAT(FuncCall, "Function call with side effects appeared");
|
||||
BADSCOP_STAT(AffFunc, "Expression not affine");
|
||||
BADSCOP_STAT(Alias, "Found base address alias");
|
||||
BADSCOP_STAT(SimpleLoop, "Loop not in -loop-simplify form");
|
||||
BADSCOP_STAT(Other, "Others");
|
||||
|
||||
namespace polly {
|
||||
|
@ -418,21 +417,6 @@ bool ReportAlias::classof(const RejectReason *RR) {
|
|||
return RR->getKind() == rrkAlias;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// ReportSimpleLoop.
|
||||
|
||||
ReportSimpleLoop::ReportSimpleLoop() : RejectReason(rrkSimpleLoop) {
|
||||
++BadSimpleLoopForScop;
|
||||
}
|
||||
|
||||
std::string ReportSimpleLoop::getMessage() const {
|
||||
return "Loop not in simplify form is invalid!";
|
||||
}
|
||||
|
||||
bool ReportSimpleLoop::classof(const RejectReason *RR) {
|
||||
return RR->getKind() == rrkSimpleLoop;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// ReportOther.
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
; A[i] = i;
|
||||
; }
|
||||
|
||||
; We will not detect this scop, as the loop is not in -loop-simplify form.
|
||||
; We will detect this scop even if the loop is not in lcssa form
|
||||
|
||||
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"
|
||||
|
||||
|
@ -41,4 +41,4 @@ return:
|
|||
ret void
|
||||
}
|
||||
|
||||
; CHECK-NOT: Valid Region for Scop
|
||||
; CHECK: Valid Region for Scop
|
||||
|
|
Loading…
Reference in New Issue