Index: include/polly/LinkAllPasses.h =================================================================== --- include/polly/LinkAllPasses.h +++ include/polly/LinkAllPasses.h @@ -42,7 +42,6 @@ llvm::Pass *createIslAstInfoPass(); llvm::Pass *createCodeGenerationPass(); llvm::Pass *createIslScheduleOptimizerPass(); -llvm::Pass *createTempScopInfoPass(); extern char &IndependentBlocksID; extern char &CodePreparationID; @@ -74,7 +73,6 @@ polly::createIslAstInfoPass(); polly::createCodeGenerationPass(); polly::createIslScheduleOptimizerPass(); - polly::createTempScopInfoPass(); } } PollyForcePassLinking; // Force link by creating a global definition. } Index: include/polly/ScopInfo.h =================================================================== --- include/polly/ScopInfo.h +++ include/polly/ScopInfo.h @@ -1389,7 +1389,7 @@ // Access function of bbs. AccFuncMapType &AccFuncMap; - friend class TempScopInfo; + friend class ScopInfo; explicit TempScop(Region &r, AccFuncMapType &accFuncMap) : R(r), AccFuncMap(accFuncMap) {} @@ -1432,14 +1432,14 @@ }; typedef std::map TempScopMapType; -//===----------------------------------------------------------------------===// -/// @brief The Function Pass to extract temporary information for Static control -/// part in llvm function. + +///===---------------------------------------------------------------------===// +/// @brief Build the Polly IR (Scop and ScopStmt) on a Region. /// -class TempScopInfo : public RegionPass { +class ScopInfo : public RegionPass { //===-------------------------------------------------------------------===// - TempScopInfo(const TempScopInfo &) = delete; - const TempScopInfo &operator=(const TempScopInfo &) = delete; + ScopInfo(const ScopInfo &) = delete; + const ScopInfo &operator=(const ScopInfo &) = delete; // The ScalarEvolution to help building Scop. ScalarEvolution *SE; @@ -1466,6 +1466,10 @@ // The TempScop for this region. TempScop *TempScopOfRegion; + // The Scop + Scop *scop; + isl_ctx *ctx; + // Clear the context. void clear(); @@ -1525,47 +1529,14 @@ public: static char ID; - explicit TempScopInfo() : RegionPass(ID), TempScopOfRegion(nullptr) {} - ~TempScopInfo(); + explicit ScopInfo(); + ~ScopInfo(); /// @brief Get the temporay Scop information in LLVM IR for this region. /// /// @return The Scop information in LLVM IR represent. TempScop *getTempScop() const; - /// @name RegionPass interface - //@{ - virtual void getAnalysisUsage(AnalysisUsage &AU) const; - virtual void releaseMemory() { clear(); } - virtual bool runOnRegion(Region *R, RGPassManager &RGM); - virtual void print(raw_ostream &OS, const Module *) const; - //@} -}; - -///===---------------------------------------------------------------------===// -/// @brief Build the Polly IR (Scop and ScopStmt) on a Region. -/// -class ScopInfo : public RegionPass { - //===-------------------------------------------------------------------===// - ScopInfo(const ScopInfo &) = delete; - const ScopInfo &operator=(const ScopInfo &) = delete; - - // The Scop - Scop *scop; - isl_ctx *ctx; - - void clear() { - if (scop) { - delete scop; - scop = 0; - } - } - -public: - static char ID; - explicit ScopInfo(); - ~ScopInfo(); - /// @brief Try to build the Polly IR of static control part on the current /// SESE-Region. /// @@ -1580,12 +1551,7 @@ virtual bool runOnRegion(Region *R, RGPassManager &RGM); virtual void getAnalysisUsage(AnalysisUsage &AU) const; virtual void releaseMemory() { clear(); } - virtual void print(raw_ostream &OS, const Module *) const { - if (scop) - scop->print(OS); - else - OS << "Invalid Scop!\n"; - } + virtual void print(raw_ostream &OS, const Module *) const; //@} }; @@ -1593,7 +1559,6 @@ namespace llvm { class PassRegistry; -void initializeTempScopInfoPass(llvm::PassRegistry &); void initializeScopInfoPass(llvm::PassRegistry &); } Index: lib/Analysis/ScopInfo.cpp =================================================================== --- lib/Analysis/ScopInfo.cpp +++ lib/Analysis/ScopInfo.cpp @@ -2389,10 +2389,9 @@ return L->getLoopDepth() - OuterLoop->getLoopDepth(); } -void TempScopInfo::buildPHIAccesses(PHINode *PHI, Region &R, - AccFuncSetType &Functions, - Region *NonAffineSubRegion, - bool IsExitBlock) { +void ScopInfo::buildPHIAccesses(PHINode *PHI, Region &R, + AccFuncSetType &Functions, + Region *NonAffineSubRegion, bool IsExitBlock) { // PHI nodes that are in the exit block of the region, hence if IsExitBlock is // true, are not modeled as ordinary PHI nodes as they are not part of the @@ -2453,8 +2452,8 @@ } } -bool TempScopInfo::buildScalarDependences(Instruction *Inst, Region *R, - Region *NonAffineSubRegion) { +bool ScopInfo::buildScalarDependences(Instruction *Inst, Region *R, + Region *NonAffineSubRegion) { bool canSynthesizeInst = canSynthesize(Inst, LI, SE, R); if (isIgnoredIntrinsic(Inst)) return false; @@ -2533,8 +2532,8 @@ extern MapInsnToMemAcc InsnToMemAcc; IRAccess -TempScopInfo::buildIRAccess(Instruction *Inst, Loop *L, Region *R, - const ScopDetection::BoxedLoopsSetTy *BoxedLoops) { +ScopInfo::buildIRAccess(Instruction *Inst, Loop *L, Region *R, + const ScopDetection::BoxedLoopsSetTy *BoxedLoops) { unsigned Size; Type *SizeType; Value *Val; @@ -2590,7 +2589,7 @@ Subscripts, Sizes, Val); } -void TempScopInfo::buildAccessFunctions(Region &R, Region &SR) { +void ScopInfo::buildAccessFunctions(Region &R, Region &SR) { if (SD->isNonAffineSubRegion(&SR, &R)) { for (BasicBlock *BB : SR.blocks()) @@ -2605,9 +2604,9 @@ buildAccessFunctions(R, *I->getNodeAs()); } -void TempScopInfo::buildAccessFunctions(Region &R, BasicBlock &BB, - Region *NonAffineSubRegion, - bool IsExitBlock) { +void ScopInfo::buildAccessFunctions(Region &R, BasicBlock &BB, + Region *NonAffineSubRegion, + bool IsExitBlock) { AccFuncSetType Functions; Loop *L = LI->getLoopFor(&BB); @@ -2650,7 +2649,7 @@ Accs.insert(Accs.end(), Functions.begin(), Functions.end()); } -TempScop *TempScopInfo::buildTempScop(Region &R) { +TempScop *ScopInfo::buildTempScop(Region &R) { TempScop *TScop = new TempScop(R, AccFuncMap); buildAccessFunctions(R, R); @@ -2668,69 +2667,32 @@ return TScop; } -TempScop *TempScopInfo::getTempScop() const { return TempScopOfRegion; } +TempScop *ScopInfo::getTempScop() const { return TempScopOfRegion; } -void TempScopInfo::print(raw_ostream &OS, const Module *) const { +void ScopInfo::print(raw_ostream &OS, const Module *) const { if (TempScopOfRegion) TempScopOfRegion->print(OS, SE, LI); -} - -bool TempScopInfo::runOnRegion(Region *R, RGPassManager &RGM) { - SD = &getAnalysis(); - if (!SD->isMaxRegionInScop(*R)) - return false; - - Function *F = R->getEntry()->getParent(); - SE = &getAnalysis().getSE(); - LI = &getAnalysis().getLoopInfo(); - AA = &getAnalysis(); - TD = &F->getParent()->getDataLayout(); - ZeroOffset = SE->getConstant(TD->getIntPtrType(F->getContext()), 0); - - assert(!TempScopOfRegion && "Build the TempScop only once"); - TempScopOfRegion = buildTempScop(*R); - - return false; -} - -void TempScopInfo::getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequiredTransitive(); - AU.addRequiredTransitive(); - AU.addRequiredTransitive(); - AU.addRequiredID(IndependentBlocksID); - AU.addRequired(); - AU.setPreservesAll(); + if (scop) + scop->print(OS); + else + OS << "Invalid Scop!\n"; } -TempScopInfo::~TempScopInfo() { clear(); } - -void TempScopInfo::clear() { +void ScopInfo::clear() { AccFuncMap.clear(); if (TempScopOfRegion) delete TempScopOfRegion; TempScopOfRegion = nullptr; -} - -//===----------------------------------------------------------------------===// -// TempScop information extraction pass implement -char TempScopInfo::ID = 0; -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(LoopInfoWrapperPass); -INITIALIZE_PASS_DEPENDENCY(RegionInfoPass); -INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass); -INITIALIZE_PASS_END(TempScopInfo, "polly-analyze-ir", - "Polly - Analyse the LLVM-IR in the detected regions", - false, false) + if (scop) { + delete scop; + scop = 0; + } +} //===----------------------------------------------------------------------===// -ScopInfo::ScopInfo() : RegionPass(ID), scop(0) { +ScopInfo::ScopInfo() : RegionPass(ID), TempScopOfRegion(nullptr), scop(0) { ctx = isl_ctx_alloc(); isl_options_set_on_error(ctx, ISL_ON_ERROR_ABORT); } @@ -2741,32 +2703,41 @@ } void ScopInfo::getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequiredID(IndependentBlocksID); AU.addRequired(); AU.addRequired(); AU.addRequired(); - AU.addRequired(); - AU.addRequired(); - AU.addRequired(); + AU.addRequiredTransitive(); + AU.addRequiredTransitive(); AU.addRequired(); AU.setPreservesAll(); } bool ScopInfo::runOnRegion(Region *R, RGPassManager &RGM) { - LoopInfo &LI = getAnalysis().getLoopInfo(); - AliasAnalysis &AA = getAnalysis(); - ScopDetection &SD = getAnalysis(); - ScalarEvolution &SE = getAnalysis().getSE(); + SD = &getAnalysis(); + + if (!SD->isMaxRegionInScop(*R)) + return false; + + Function *F = R->getEntry()->getParent(); + SE = &getAnalysis().getSE(); + LI = &getAnalysis().getLoopInfo(); + AA = &getAnalysis(); + TD = &F->getParent()->getDataLayout(); DominatorTree &DT = getAnalysis().getDomTree(); + ZeroOffset = SE->getConstant(TD->getIntPtrType(F->getContext()), 0); - TempScop *tempScop = getAnalysis().getTempScop(); + assert(!TempScopOfRegion && "Build the TempScop only once"); + TempScopOfRegion = buildTempScop(*R); // This region is no Scop. - if (!tempScop) { + if (!TempScopOfRegion) { scop = nullptr; return false; } - scop = Scop::createFromTempScop(*tempScop, LI, SE, SD, AA, DT, ctx); + scop = + Scop::createFromTempScop(*TempScopOfRegion, *LI, *SE, *SD, *AA, DT, ctx); DEBUG(scop->print(dbgs())); @@ -2795,7 +2766,6 @@ INITIALIZE_PASS_DEPENDENCY(RegionInfoPass); INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass); INITIALIZE_PASS_DEPENDENCY(ScopDetection); -INITIALIZE_PASS_DEPENDENCY(TempScopInfo); INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass); INITIALIZE_PASS_END(ScopInfo, "polly-scops", "Polly - Create polyhedral description of Scops", false, Index: lib/CodeGen/CodeGeneration.cpp =================================================================== --- lib/CodeGen/CodeGeneration.cpp +++ lib/CodeGen/CodeGeneration.cpp @@ -178,7 +178,6 @@ // FIXME: We do not yet add regions for the newly generated code to the // region tree. AU.addPreserved(); - AU.addPreserved(); AU.addPreserved(); AU.addPreservedID(IndependentBlocksID); } Index: lib/Support/RegisterPasses.cpp =================================================================== --- lib/Support/RegisterPasses.cpp +++ lib/Support/RegisterPasses.cpp @@ -154,7 +154,6 @@ initializePollyCanonicalizePass(Registry); initializeScopDetectionPass(Registry); initializeScopInfoPass(Registry); - initializeTempScopInfoPass(Registry); } /// @brief Register Polly passes such that they form a polyhedral optimizer. Index: test/ScopInfo/Alias-0.ll =================================================================== --- test/ScopInfo/Alias-0.ll +++ test/ScopInfo/Alias-0.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 -polly-detect-unprofitable -polly-code-generator=isl -polly-scops -analyze < %s -stats 2>&1 | FileCheck %s --check-prefix=RTA +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-scops -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" Index: test/ScopInfo/Alias-1.ll =================================================================== --- test/ScopInfo/Alias-1.ll +++ test/ScopInfo/Alias-1.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 -polly-detect-unprofitable -polly-code-generator=isl -polly-scops -analyze < %s -stats 2>&1 | FileCheck %s --check-prefix=RTA +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-scops -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" Index: test/ScopInfo/Alias-2.ll =================================================================== --- test/ScopInfo/Alias-2.ll +++ test/ScopInfo/Alias-2.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 -polly-detect-unprofitable -polly-code-generator=isl -polly-scops -analyze < %s -stats 2>&1 | FileCheck %s --check-prefix=RTA +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-scops -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" Index: test/ScopInfo/Alias-3.ll =================================================================== --- test/ScopInfo/Alias-3.ll +++ test/ScopInfo/Alias-3.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 -polly-detect-unprofitable -polly-code-generator=isl -polly-scops -analyze < %s -stats 2>&1 | FileCheck %s --check-prefix=RTA +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-scops -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" Index: test/ScopInfo/Alias-4.ll =================================================================== --- test/ScopInfo/Alias-4.ll +++ 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 -polly-detect-unprofitable -polly-code-generator=isl -polly-scops -analyze < %s -stats 2>&1 | FileCheck %s --check-prefix=RTA +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-code-generator=isl -polly-scops -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" Index: test/ScopInfo/aliasing_many_parameters_not_all_involved.ll =================================================================== --- test/ScopInfo/aliasing_many_parameters_not_all_involved.ll +++ test/ScopInfo/aliasing_many_parameters_not_all_involved.ll @@ -4,11 +4,11 @@ ; Check that we allow this SCoP even though it has 10 parameters involved in posisbly aliasing accesses. ; However, only 7 are involved in accesses through B, 8 through C and none in accesses through A. ; -; MAX8: Printing analysis 'Polly - Create polyhedral description of Scops' for region: 'for.cond => for.end' in function 'jd': -; MAX8-NEXT: Function: jd +; MAX8-LABEL: Printing analysis 'Polly - Create polyhedral description of Scops' for region: 'for.cond => for.end' in function 'jd': +; MAX8: Function: jd -; MAX7: Printing analysis 'Polly - Create polyhedral description of Scops' for region: 'for.cond => for.end' in function 'jd': -; MAX7-NEXT: Invalid Scop! +; MAX7-LABEL: Printing analysis 'Polly - Create polyhedral description of Scops' for region: 'for.cond => for.end' in function 'jd': +; MAX7: Invalid Scop! ; ; void jd(int *A, int *B, int *C, long p1, long p2, long p3, long p4, long p5, ; long p6, long p7, long p8, long p9, long p10) { Index: test/ScopInfo/bug_2010_10_22.ll =================================================================== --- test/ScopInfo/bug_2010_10_22.ll +++ test/ScopInfo/bug_2010_10_22.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-detect-unprofitable -polly-analyze-ir < %s +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops < %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-n8:16:32:64" Index: test/ScopInfo/bug_2011_1_5.ll =================================================================== --- test/ScopInfo/bug_2011_1_5.ll +++ test/ScopInfo/bug_2011_1_5.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-detect-unprofitable -polly-analyze-ir -analyze < %s +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops -analyze < %s ; Bug description: Alias Analysis thinks IntToPtrInst aliases with alloca instructions created by IndependentBlocks Pass. ; This will trigger the assertion when we are verifying the SCoP after IndependentBlocks. Index: test/ScopInfo/cond_in_loop.ll =================================================================== --- test/ScopInfo/cond_in_loop.ll +++ test/ScopInfo/cond_in_loop.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-detect-unprofitable -polly-analyze-ir -analyze < %s | not FileCheck %s +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops -analyze < %s | FileCheck %s ;void f(long a[], long N, long M) { ; long i, j, k; @@ -44,4 +44,5 @@ ret void } -; CHECK: Scop! +; CHECK-LABEL: Printing analysis 'Polly - Create polyhedral description of Scops' for region: 'bb => return' in function 'f': +; CHECK-NEXT: Scop: bb => return Index: test/TempScop/inter_bb_scalar_dep.ll =================================================================== --- test/TempScop/inter_bb_scalar_dep.ll +++ test/TempScop/inter_bb_scalar_dep.ll @@ -1,5 +1,4 @@ -; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-analyze-ir -analyze < %s | FileCheck %s -; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-analyze-ir -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-scops -analyze < %s | FileCheck %s ; void f(long A[], int N, int *init_ptr) { ; long i, j; Index: test/TempScop/intra_and_inter_bb_scalar_dep.ll =================================================================== --- test/TempScop/intra_and_inter_bb_scalar_dep.ll +++ test/TempScop/intra_and_inter_bb_scalar_dep.ll @@ -1,5 +1,4 @@ -; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-analyze-ir -analyze < %s | FileCheck %s -; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-analyze-ir -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-scops -analyze < %s | FileCheck %s ; void f(long A[], int N, int *init_ptr) { ; long i, j; Index: test/TempScop/intra_bb_scalar_dep.ll =================================================================== --- test/TempScop/intra_bb_scalar_dep.ll +++ test/TempScop/intra_bb_scalar_dep.ll @@ -1,5 +1,4 @@ -; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-analyze-ir -analyze < %s | FileCheck %s -; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-analyze-ir -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-scops -analyze < %s | FileCheck %s ; void f(long A[], int N, int *init_ptr) { ; long i, j; Index: test/TempScop/not-a-reduction.ll =================================================================== --- test/TempScop/not-a-reduction.ll +++ test/TempScop/not-a-reduction.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-detect-unprofitable -polly-analyze-ir -analyze < %s 2>&1 | not FileCheck %s +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops -analyze < %s 2>&1 | not FileCheck %s ;#define TYPE float ;#define NUM 4 @@ -47,4 +47,5 @@ ret void } -; CHECK: Reduction +; Match any reduction type except "[Reduction Type: NONE]" +; CHECK: [Reduction Type: {{[^N].*}}] Index: test/TempScop/scalar_to_array.ll =================================================================== --- test/TempScop/scalar_to_array.ll +++ test/TempScop/scalar_to_array.ll @@ -1,5 +1,4 @@ -; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-analyze-ir -analyze < %s | FileCheck %s -; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-analyze-ir -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-scops -analyze < %s | FileCheck %s ; ModuleID = 'scalar_to_array.ll' 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" Index: test/TempScop/tempscop-printing.ll =================================================================== --- test/TempScop/tempscop-printing.ll +++ test/TempScop/tempscop-printing.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-analyze-ir -analyze < %s | FileCheck %s -check-prefix=SCALARACCESS +; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-scops -analyze < %s | FileCheck %s -check-prefix=SCALARACCESS ; void f(long A[], int N, int *init_ptr) { ; long i, j;