diff options
| author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-09-09 14:19:04 +0000 |
|---|---|---|
| committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-09-09 14:19:04 +0000 |
| commit | 7ca8dc2d2df159c7f292b2e50fee7d2957986558 (patch) | |
| tree | fa0be64997e5d6633c876e9fdf79b9ac62cf3aad /polly | |
| parent | 6b28f09d679ef18cbd447957d1ac21068a3f4e8e (diff) | |
| download | bcm5719-llvm-7ca8dc2d2df159c7f292b2e50fee7d2957986558.tar.gz bcm5719-llvm-7ca8dc2d2df159c7f292b2e50fee7d2957986558.zip | |
Disable support for pointer expressions
The support for pointer expressions is broken as it can only handle
some patterns in the IslExprBuilder. We should to treat pointers in
expressions the same as integers at some point and revert this patch.
llvm-svn: 247147
Diffstat (limited to 'polly')
| -rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 6 | ||||
| -rw-r--r-- | polly/lib/Support/SCEVValidator.cpp | 12 | ||||
| -rw-r--r-- | polly/test/Isl/CodeGen/20120316-InvalidCast.ll | 5 | ||||
| -rw-r--r-- | polly/test/Isl/CodeGen/pointer-type-expressions-2.ll | 5 | ||||
| -rw-r--r-- | polly/test/Isl/CodeGen/pointer-type-expressions.ll | 5 | ||||
| -rw-r--r-- | polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll | 5 | ||||
| -rw-r--r-- | polly/test/ScopInfo/pointer-type-expressions.ll | 5 |
7 files changed, 41 insertions, 2 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 06f1bfc68af..34e19648a0b 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -344,6 +344,12 @@ bool ScopDetection::isValidCFG(BasicBlock &BB, isa<UndefValue>(ICmp->getOperand(1))) return invalid<ReportUndefOperand>(Context, /*Assert=*/true, &BB, ICmp); + // TODO: FIXME: IslExprBuilder is not capable of producing valid code + // for arbitrary pointer expressions at the moment. Until + // this is fixed we disallow pointer expressions completely. + if (ICmp->getOperand(0)->getType()->isPointerTy()) + return false; + Loop *L = LI->getLoopFor(ICmp->getParent()); const SCEV *LHS = SE->getSCEVAtScope(ICmp->getOperand(0), L); const SCEV *RHS = SE->getSCEVAtScope(ICmp->getOperand(1), L); diff --git a/polly/lib/Support/SCEVValidator.cpp b/polly/lib/Support/SCEVValidator.cpp index 2092047e92e..85bda185ec3 100644 --- a/polly/lib/Support/SCEVValidator.cpp +++ b/polly/lib/Support/SCEVValidator.cpp @@ -366,8 +366,16 @@ public: ValidatorResult visitUnknown(const SCEVUnknown *Expr) { Value *V = Expr->getValue(); - if (!(Expr->getType()->isIntegerTy() || Expr->getType()->isPointerTy())) { - DEBUG(dbgs() << "INVALID: UnknownExpr is not an integer or pointer type"); + // TODO: FIXME: IslExprBuilder is not capable of producing valid code + // for arbitrary pointer expressions at the moment. Until + // this is fixed we disallow pointer expressions completely. + if (Expr->getType()->isPointerTy()) { + DEBUG(dbgs() << "INVALID: UnknownExpr is a pointer type [FIXME]"); + return ValidatorResult(SCEVType::INVALID); + } + + if (!Expr->getType()->isIntegerTy()) { + DEBUG(dbgs() << "INVALID: UnknownExpr is not an integer"); return ValidatorResult(SCEVType::INVALID); } diff --git a/polly/test/Isl/CodeGen/20120316-InvalidCast.ll b/polly/test/Isl/CodeGen/20120316-InvalidCast.ll index 8ef27fd7b63..71c4a16435d 100644 --- a/polly/test/Isl/CodeGen/20120316-InvalidCast.ll +++ b/polly/test/Isl/CodeGen/20120316-InvalidCast.ll @@ -1,5 +1,10 @@ ; RUN: opt %loadPolly -polly-detect-unprofitable -S -polly-codegen -polly-no-early-exit < %s | FileCheck %s +; TODO: FIXME: IslExprBuilder is not capable of producing valid code +; for arbitrary pointer expressions at the moment. Until +; this is fixed we disallow pointer expressions completely. +; XFAIL: * + ; CHECK: polly.start target datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-a0:0-n32" diff --git a/polly/test/Isl/CodeGen/pointer-type-expressions-2.ll b/polly/test/Isl/CodeGen/pointer-type-expressions-2.ll index 68b23fed503..7c273477a23 100644 --- a/polly/test/Isl/CodeGen/pointer-type-expressions-2.ll +++ b/polly/test/Isl/CodeGen/pointer-type-expressions-2.ll @@ -2,6 +2,11 @@ ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +; TODO: FIXME: IslExprBuilder is not capable of producing valid code +; for arbitrary pointer expressions at the moment. Until +; this is fixed we disallow pointer expressions completely. +; XFAIL: * + define void @foo(i8* %start, i8* %end) { entry: %A = alloca i32 diff --git a/polly/test/Isl/CodeGen/pointer-type-expressions.ll b/polly/test/Isl/CodeGen/pointer-type-expressions.ll index e3c24a76332..d3f85d9589e 100644 --- a/polly/test/Isl/CodeGen/pointer-type-expressions.ll +++ b/polly/test/Isl/CodeGen/pointer-type-expressions.ll @@ -1,6 +1,11 @@ ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-ast -analyze < %s | FileCheck %s ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN +; TODO: FIXME: IslExprBuilder is not capable of producing valid code +; for arbitrary pointer expressions at the moment. Until +; this is fixed we disallow pointer expressions completely. +; XFAIL: * + ; void f(int a[], int N, float *P) { ; int i; ; for (i = 0; i < N; ++i) diff --git a/polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll b/polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll index 61f46062ef5..91d91352f69 100644 --- a/polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll +++ b/polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll @@ -1,6 +1,11 @@ ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-ast -analyze < %s | FileCheck %s ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN ; +; TODO: FIXME: IslExprBuilder is not capable of producing valid code +; for arbitrary pointer expressions at the moment. Until +; this is fixed we disallow pointer expressions completely. +; XFAIL: * + ; void f(int a[], int N, float *P, float *Q) { ; int i; ; for (i = 0; i < N; ++i) diff --git a/polly/test/ScopInfo/pointer-type-expressions.ll b/polly/test/ScopInfo/pointer-type-expressions.ll index cf25e4d6697..44c7de37fda 100644 --- a/polly/test/ScopInfo/pointer-type-expressions.ll +++ b/polly/test/ScopInfo/pointer-type-expressions.ll @@ -1,5 +1,10 @@ ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops -analyze < %s | FileCheck %s +; TODO: FIXME: IslExprBuilder is not capable of producing valid code +; for arbitrary pointer expressions at the moment. Until +; this is fixed we disallow pointer expressions completely. +; XFAIL: * + ; void f(int a[], int N, float *P) { ; int i; ; for (i = 0; i < N; ++i) |

