summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/include/polly/ScopDetection.h2
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp6
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp6
-rw-r--r--polly/lib/Analysis/TempScopInfo.cpp6
-rw-r--r--polly/lib/CodeGen/CodeGeneration.cpp8
-rw-r--r--polly/lib/Transform/IndependentBlocks.cpp8
-rw-r--r--polly/test/Isl/Ast/alias_simple_1.ll10
-rw-r--r--polly/test/Isl/Ast/alias_simple_2.ll10
-rw-r--r--polly/test/Isl/Ast/alias_simple_3.ll10
-rw-r--r--polly/test/Isl/CodeGen/multidim-non-matching-typesize-2.ll2
-rw-r--r--polly/test/Isl/CodeGen/multidim-non-matching-typesize.ll2
-rw-r--r--polly/test/Isl/CodeGen/phi_in_exit_early_lnt_failure_4.ll2
-rw-r--r--polly/test/ScopDetect/base_pointer.ll4
-rw-r--r--polly/test/ScopInfo/Alias-4.ll4
14 files changed, 48 insertions, 32 deletions
diff --git a/polly/include/polly/ScopDetection.h b/polly/include/polly/ScopDetection.h
index a7c22a9f833..a6eb6e02f0c 100644
--- a/polly/include/polly/ScopDetection.h
+++ b/polly/include/polly/ScopDetection.h
@@ -49,6 +49,7 @@
#include "polly/ScopDetectionDiagnostic.h"
#include "llvm/ADT/SetVector.h"
+#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AliasSetTracker.h"
#include "llvm/Pass.h"
#include <map>
@@ -68,7 +69,6 @@ class SCEVAddRecExpr;
class SCEVUnknown;
class CallInst;
class Instruction;
-class AliasAnalysis;
class Value;
}
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index 34e19648a0b..6cc8f6a1a74 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -1064,7 +1064,7 @@ bool ScopDetection::runOnFunction(llvm::Function &F) {
if (!DetectUnprofitable && LI->empty())
return false;
- AA = &getAnalysis<AliasAnalysis>();
+ AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
Region *TopRegion = RI->getTopLevelRegion();
@@ -1129,7 +1129,7 @@ void ScopDetection::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfoWrapperPass>();
AU.addRequired<ScalarEvolutionWrapperPass>();
// We also need AA and RegionInfo when we are verifying analysis.
- AU.addRequiredTransitive<AliasAnalysis>();
+ AU.addRequiredTransitive<AAResultsWrapperPass>();
AU.addRequiredTransitive<RegionInfoPass>();
AU.setPreservesAll();
}
@@ -1157,7 +1157,7 @@ Pass *polly::createScopDetectionPass() { return new ScopDetection(); }
INITIALIZE_PASS_BEGIN(ScopDetection, "polly-detect",
"Polly - Detect static control parts (SCoPs)", false,
false);
-INITIALIZE_AG_DEPENDENCY(AliasAnalysis);
+INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass);
INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass);
INITIALIZE_PASS_DEPENDENCY(RegionInfoPass);
INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass);
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index acb44c91326..be2e2977e22 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -2354,13 +2354,13 @@ void ScopInfo::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<ScalarEvolutionWrapperPass>();
AU.addRequired<ScopDetection>();
AU.addRequired<TempScopInfo>();
- AU.addRequired<AliasAnalysis>();
+ AU.addRequired<AAResultsWrapperPass>();
AU.setPreservesAll();
}
bool ScopInfo::runOnRegion(Region *R, RGPassManager &RGM) {
LoopInfo &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
- AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
+ AliasAnalysis &AA = getAnalysis<AAResultsWrapperPass>().getAAResults();
ScopDetection &SD = getAnalysis<ScopDetection>();
ScalarEvolution &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE();
DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
@@ -2397,7 +2397,7 @@ Pass *polly::createScopInfoPass() { return new ScopInfo(); }
INITIALIZE_PASS_BEGIN(ScopInfo, "polly-scops",
"Polly - Create polyhedral description of Scops", false,
false);
-INITIALIZE_AG_DEPENDENCY(AliasAnalysis);
+INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass);
INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass);
INITIALIZE_PASS_DEPENDENCY(RegionInfoPass);
INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass);
diff --git a/polly/lib/Analysis/TempScopInfo.cpp b/polly/lib/Analysis/TempScopInfo.cpp
index 0467b6c97f8..c3afa017723 100644
--- a/polly/lib/Analysis/TempScopInfo.cpp
+++ b/polly/lib/Analysis/TempScopInfo.cpp
@@ -385,7 +385,7 @@ bool TempScopInfo::runOnRegion(Region *R, RGPassManager &RGM) {
Function *F = R->getEntry()->getParent();
SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
- AA = &getAnalysis<AliasAnalysis>();
+ AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
TD = &F->getParent()->getDataLayout();
ZeroOffset = SE->getConstant(TD->getIntPtrType(F->getContext()), 0);
@@ -400,7 +400,7 @@ void TempScopInfo::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequiredTransitive<ScalarEvolutionWrapperPass>();
AU.addRequiredTransitive<ScopDetection>();
AU.addRequiredID(IndependentBlocksID);
- AU.addRequired<AliasAnalysis>();
+ AU.addRequired<AAResultsWrapperPass>();
AU.setPreservesAll();
}
@@ -422,7 +422,7 @@ Pass *polly::createTempScopInfoPass() { return new TempScopInfo(); }
INITIALIZE_PASS_BEGIN(TempScopInfo, "polly-analyze-ir",
"Polly - Analyse the LLVM-IR in the detected regions",
false, false);
-INITIALIZE_AG_DEPENDENCY(AliasAnalysis);
+INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass);
INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass);
INITIALIZE_PASS_DEPENDENCY(RegionInfoPass);
INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass);
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
index 0be2eab3870..b8e40087226 100644
--- a/polly/lib/CodeGen/CodeGeneration.cpp
+++ b/polly/lib/CodeGen/CodeGeneration.cpp
@@ -30,7 +30,11 @@
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Analysis/AliasAnalysis.h"
+#include "llvm/Analysis/BasicAliasAnalysis.h"
+#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/PostDominators.h"
+#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h"
using namespace polly;
using namespace llvm;
@@ -169,12 +173,16 @@ public:
AU.addPreserved<DependenceInfo>();
+ AU.addPreserved<AAResultsWrapperPass>();
+ AU.addPreserved<BasicAAWrapperPass>();
AU.addPreserved<LoopInfoWrapperPass>();
AU.addPreserved<DominatorTreeWrapperPass>();
+ AU.addPreserved<GlobalsAAWrapperPass>();
AU.addPreserved<PostDominatorTree>();
AU.addPreserved<IslAstInfo>();
AU.addPreserved<ScopDetection>();
AU.addPreserved<ScalarEvolutionWrapperPass>();
+ AU.addPreserved<SCEVAAWrapperPass>();
// FIXME: We do not yet add regions for the newly generated code to the
// region tree.
diff --git a/polly/lib/Transform/IndependentBlocks.cpp b/polly/lib/Transform/IndependentBlocks.cpp
index 779f87c40c8..4908b8a875d 100644
--- a/polly/lib/Transform/IndependentBlocks.cpp
+++ b/polly/lib/Transform/IndependentBlocks.cpp
@@ -16,10 +16,14 @@
#include "polly/Options.h"
#include "polly/ScopDetection.h"
#include "polly/Support/ScopHelper.h"
+#include "llvm/Analysis/AliasAnalysis.h"
+#include "llvm/Analysis/BasicAliasAnalysis.h"
#include "llvm/Analysis/DominanceFrontier.h"
+#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/RegionInfo.h"
+#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Support/CommandLine.h"
@@ -309,8 +313,11 @@ bool IndependentBlocks::areAllBlocksIndependent(const Region *R) const {
void IndependentBlocks::getAnalysisUsage(AnalysisUsage &AU) const {
// FIXME: If we set preserves cfg, the cfg only passes do not need to
// be "addPreserved"?
+ AU.addPreserved<AAResultsWrapperPass>();
+ AU.addPreserved<BasicAAWrapperPass>();
AU.addPreserved<DominatorTreeWrapperPass>();
AU.addPreserved<DominanceFrontier>();
+ AU.addPreserved<GlobalsAAWrapperPass>();
AU.addPreserved<PostDominatorTree>();
AU.addRequired<RegionInfoPass>();
AU.addPreserved<RegionInfoPass>();
@@ -318,6 +325,7 @@ void IndependentBlocks::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addPreserved<LoopInfoWrapperPass>();
AU.addRequired<ScalarEvolutionWrapperPass>();
AU.addPreserved<ScalarEvolutionWrapperPass>();
+ AU.addPreserved<SCEVAAWrapperPass>();
AU.addRequired<ScopDetection>();
AU.addPreserved<ScopDetection>();
}
diff --git a/polly/test/Isl/Ast/alias_simple_1.ll b/polly/test/Isl/Ast/alias_simple_1.ll
index f441cc87d25..9fc41279c27 100644
--- a/polly/test/Isl/Ast/alias_simple_1.ll
+++ b/polly/test/Isl/Ast/alias_simple_1.ll
@@ -1,8 +1,8 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit < %s | FileCheck %s --check-prefix=NOAA
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -basicaa < %s | FileCheck %s --check-prefix=BASI
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -tbaa < %s | FileCheck %s --check-prefix=TBAA
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -scev-aa < %s | FileCheck %s --check-prefix=SCEV
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -globalsmodref-aa < %s | FileCheck %s --check-prefix=GLOB
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa < %s | FileCheck %s --check-prefix=NOAA
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit < %s | FileCheck %s --check-prefix=BASI
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa -tbaa < %s | FileCheck %s --check-prefix=TBAA
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa -scev-aa < %s | FileCheck %s --check-prefix=SCEV
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa -globals-aa < %s | FileCheck %s --check-prefix=GLOB
;
; int A[1024];
;
diff --git a/polly/test/Isl/Ast/alias_simple_2.ll b/polly/test/Isl/Ast/alias_simple_2.ll
index ba8283b17ea..b32af7815b1 100644
--- a/polly/test/Isl/Ast/alias_simple_2.ll
+++ b/polly/test/Isl/Ast/alias_simple_2.ll
@@ -1,8 +1,8 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit < %s | FileCheck %s --check-prefix=NOAA
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -basicaa < %s | FileCheck %s --check-prefix=BASI
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -tbaa < %s | FileCheck %s --check-prefix=TBAA
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -scev-aa < %s | FileCheck %s --check-prefix=SCEV
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -globalsmodref-aa < %s | FileCheck %s --check-prefix=GLOB
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa < %s | FileCheck %s --check-prefix=NOAA
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit < %s | FileCheck %s --check-prefix=BASI
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa -tbaa < %s | FileCheck %s --check-prefix=TBAA
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa -scev-aa < %s | FileCheck %s --check-prefix=SCEV
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa -globals-aa < %s | FileCheck %s --check-prefix=GLOB
;
; int A[1024], B[1024];
;
diff --git a/polly/test/Isl/Ast/alias_simple_3.ll b/polly/test/Isl/Ast/alias_simple_3.ll
index e3aeb7b1242..d93761bebfe 100644
--- a/polly/test/Isl/Ast/alias_simple_3.ll
+++ b/polly/test/Isl/Ast/alias_simple_3.ll
@@ -1,8 +1,8 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit < %s | FileCheck %s --check-prefix=NOAA
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -basicaa < %s | FileCheck %s --check-prefix=BASI
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -tbaa < %s | FileCheck %s --check-prefix=TBAA
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -scev-aa < %s | FileCheck %s --check-prefix=SCEV
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -globalsmodref-aa < %s | FileCheck %s --check-prefix=GLOB
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa < %s | FileCheck %s --check-prefix=NOAA
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit < %s | FileCheck %s --check-prefix=BASI
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa -tbaa < %s | FileCheck %s --check-prefix=TBAA
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa -scev-aa < %s | FileCheck %s --check-prefix=SCEV
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-ast -analyze -polly-no-early-exit -disable-basicaa -globals-aa < %s | FileCheck %s --check-prefix=GLOB
;
; int A[1024];
; float B[1024];
diff --git a/polly/test/Isl/CodeGen/multidim-non-matching-typesize-2.ll b/polly/test/Isl/CodeGen/multidim-non-matching-typesize-2.ll
index e3973fb20be..bd5d2aaa625 100644
--- a/polly/test/Isl/CodeGen/multidim-non-matching-typesize-2.ll
+++ b/polly/test/Isl/CodeGen/multidim-non-matching-typesize-2.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-codegen -polly-detect-unprofitable \
+; RUN: opt %loadPolly -disable-basicaa -polly-codegen -polly-detect-unprofitable \
; RUN: -S < %s | FileCheck %s
; CHECK: polly
target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
diff --git a/polly/test/Isl/CodeGen/multidim-non-matching-typesize.ll b/polly/test/Isl/CodeGen/multidim-non-matching-typesize.ll
index dea162775b8..fbafee64ce4 100644
--- a/polly/test/Isl/CodeGen/multidim-non-matching-typesize.ll
+++ b/polly/test/Isl/CodeGen/multidim-non-matching-typesize.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-codegen -polly-detect-unprofitable \
+; RUN: opt %loadPolly -disable-basicaa -polly-codegen -polly-detect-unprofitable \
; RUN: -S < %s | FileCheck %s
target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
diff --git a/polly/test/Isl/CodeGen/phi_in_exit_early_lnt_failure_4.ll b/polly/test/Isl/CodeGen/phi_in_exit_early_lnt_failure_4.ll
index 5ccce9e8295..0e9d2a70af7 100644
--- a/polly/test/Isl/CodeGen/phi_in_exit_early_lnt_failure_4.ll
+++ b/polly/test/Isl/CodeGen/phi_in_exit_early_lnt_failure_4.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-codegen -polly-no-early-exit -S < %s | FileCheck %s
+; RUN: opt %loadPolly -disable-basicaa -polly-detect-unprofitable -polly-codegen -polly-no-early-exit -S < %s | FileCheck %s
;
; This caused an lnt crash at some point, just verify it will run through and
; produce the PHI node in the exit we are looking for.
diff --git a/polly/test/ScopDetect/base_pointer.ll b/polly/test/ScopDetect/base_pointer.ll
index 3d52f91e88b..d602eb047e3 100644
--- a/polly/test/ScopDetect/base_pointer.ll
+++ b/polly/test/ScopDetect/base_pointer.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-detect -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-detect -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -disable-basicaa -polly-detect-unprofitable -polly-detect -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -disable-basicaa -polly-detect-unprofitable -polly-detect -analyze < %s | FileCheck %s
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"
diff --git a/polly/test/ScopInfo/Alias-4.ll b/polly/test/ScopInfo/Alias-4.ll
index 5854b4592eb..4e137cf8378 100644
--- a/polly/test/ScopInfo/Alias-4.ll
+++ b/polly/test/ScopInfo/Alias-4.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-analyze-ir -analyze < %s -stats 2>&1 | FileCheck %s --check-prefix=RTA
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-analyze-ir -polly-use-runtime-alias-checks=false -analyze < %s -stats 2>&1 | FileCheck %s --check-prefix=NORTA
+; RUN: opt %loadPolly -disable-basicaa -polly-detect-unprofitable -polly-code-generator=isl -polly-analyze-ir -analyze < %s -stats 2>&1 | FileCheck %s --check-prefix=RTA
+; RUN: opt %loadPolly -disable-basicaa -polly-detect-unprofitable -polly-code-generator=isl -polly-analyze-ir -polly-use-runtime-alias-checks=false -analyze < %s -stats 2>&1 | FileCheck %s --check-prefix=NORTA
; REQUIRES: asserts
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-n8:16:32:64"
OpenPOWER on IntegriCloud