Index: include/polly/LinkAllPasses.h =================================================================== --- include/polly/LinkAllPasses.h +++ include/polly/LinkAllPasses.h @@ -38,6 +38,7 @@ llvm::Pass *createPollyCanonicalizePass(); llvm::Pass *createScopDetectionPass(); llvm::Pass *createScopInfoRegionPassPass(); +llvm::Pass *createScopInfoWrapperPassPass(); llvm::Pass *createIslAstInfoPass(); llvm::Pass *createCodeGenerationPass(); llvm::Pass *createIslScheduleOptimizerPass(); @@ -66,6 +67,7 @@ polly::createJSONImporterPass(); polly::createScopDetectionPass(); polly::createScopInfoRegionPassPass(); + polly::createScopInfoWrapperPassPass(); polly::createPollyCanonicalizePass(); polly::createIslAstInfoPass(); polly::createCodeGenerationPass(); Index: include/polly/ScopInfo.h =================================================================== --- include/polly/ScopInfo.h +++ include/polly/ScopInfo.h @@ -64,7 +64,7 @@ class MemoryAccess; class Scop; class ScopStmt; -class ScopInfo; +class ScopBuilder; //===---------------------------------------------------------------------===// @@ -482,7 +482,7 @@ /// sum[i+j] = sum[i] + 3; /// /// Here not all iterations access the same memory location, but iterations - /// for which j = 0 holds do. After lifting the equality check in ScopInfo, + /// for which j = 0 holds do. After lifting the equality check in ScopBuilder, /// subsequent transformations do not only need check if a statement is /// reduction like, but they also need to verify that that the reduction /// property is only exploited for statement instances that load from and @@ -1503,7 +1503,7 @@ /// @brief List of invariant accesses. InvariantEquivClassesTy InvariantEquivClasses; - /// @brief Scop constructor; invoked from ScopInfo::buildScop. + /// @brief Scop constructor; invoked from ScopBuilder::buildScop. Scop(Region &R, ScalarEvolution &SE, LoopInfo &LI, ScopDetection::DetectionContext &DC); @@ -1513,7 +1513,7 @@ } //@} - /// @brief Initialize this ScopInfo . + /// @brief Initialize this ScopBuilder. void init(AliasAnalysis &AA, AssumptionCache &AC, DominatorTree &DT, LoopInfo &LI); @@ -1814,7 +1814,7 @@ void printAliasAssumptions(raw_ostream &OS) const; //@} - friend class ScopInfo; + friend class ScopBuilder; public: ~Scop(); @@ -2247,10 +2247,10 @@ } /// @brief Build the Polly IR (Scop and ScopStmt) on a Region. -class ScopInfo { +class ScopBuilder { //===-------------------------------------------------------------------===// - ScopInfo(const ScopInfo &) = delete; - const ScopInfo &operator=(const ScopInfo &) = delete; + ScopBuilder(const ScopBuilder &) = delete; + const ScopBuilder &operator=(const ScopBuilder &) = delete; /// @brief The AliasAnalysis to build AliasSetTracker. AliasAnalysis &AA; @@ -2468,26 +2468,24 @@ void addPHIReadAccess(PHINode *PHI); public: - explicit ScopInfo(Region *R, AssumptionCache &AC, AliasAnalysis &AA, - const DataLayout &DL, DominatorTree &DT, LoopInfo &LI, - ScopDetection &SD, ScalarEvolution &SE); - ~ScopInfo() {} + explicit ScopBuilder(Region *R, AssumptionCache &AC, AliasAnalysis &AA, + const DataLayout &DL, DominatorTree &DT, LoopInfo &LI, + ScopDetection &SD, ScalarEvolution &SE); + ~ScopBuilder() {} /// @brief Try to build the Polly IR of static control part on the current /// SESE-Region. /// - /// @return If the current region is a valid for a static control part, - /// return the Polly IR representing this static control part, - /// return null otherwise. - Scop *getScop() { return scop.get(); } - const Scop *getScop() const { return scop.get(); } + /// @return Give up the ownership of the scop object or static control part + /// for the region + std::unique_ptr getScop() { return std::move(scop); } }; /// @brief The legacy pass manager's analysis pass to compute scop information /// for a region. class ScopInfoRegionPass : public RegionPass { - /// @brief The ScopInfo pointer which is used to construct a Scop. - std::unique_ptr SI; + /// @brief The Scop pointer which is used to construct a Scop. + std::unique_ptr scop; public: static char ID; // Pass identification, replacement for typeid @@ -2495,27 +2493,81 @@ ScopInfoRegionPass() : RegionPass(ID) {} ~ScopInfoRegionPass() {} - /// @brief Build ScopInfo object, which constructs Polly IR of static control + /// @brief Build Scop object, the Polly IR of static control /// part for the current SESE-Region. /// - /// @return Return Scop for the current Region. - Scop *getScop() { - if (SI) - return SI.get()->getScop(); + /// @return If the current region is a valid for a static control part, + /// return the Polly IR representing this static control part, + /// return null otherwise. + Scop *getScop() const { return scop.get(); } + // const Scop *getScop() const { return scop.get(); } + + /// @brief Calculate the polyhedral scop information for a given Region. + bool runOnRegion(Region *R, RGPassManager &RGM) override; + + void releaseMemory() override { scop.reset(); } + + void print(raw_ostream &O, const Module *M = nullptr) const override; + + void getAnalysisUsage(AnalysisUsage &AU) const override; +}; + +//===----------------------------------------------------------------------===// +/// @brief The legacy pass manager's analysis pass to compute scop information +/// for the whole function. +/// +/// This pass will maintain a map of Region to its Scop object for all the +/// top level regions present in the function. +/// This pass is designed to be used by other larger passes such as +/// PolyhedralInfo function pass as currently it is not feasible to schedula a +/// region pass from a function pass in LLVM. +class ScopInfoWrapperPass : public FunctionPass { + +public: + using RegionToScopMapTy = DenseMap>; + using iterator = RegionToScopMapTy::iterator; + using const_iterator = RegionToScopMapTy::const_iterator; + +private: + /// @brief A map of Region to its Scop object containing + /// Polly IR of static control part + RegionToScopMapTy regionToScopMap; + +public: + static char ID; // Pass identification, replacement for typeid + + ScopInfoWrapperPass() : FunctionPass(ID) {} + ~ScopInfoWrapperPass() {} + + /// @brief Get the ScopInfo object for the given Region + Scop *getScop(Region *R) { + auto it = regionToScopMap.find(R); + if (it != regionToScopMap.end()) + return it->second.get(); else return nullptr; } - const Scop *getScop() const { - if (SI) - return SI.get()->getScop(); + + const Scop *getScop(Region *R) const { + auto it = regionToScopMap.find(R); + if (it != regionToScopMap.end()) + return it->second.get(); else return nullptr; } - /// @brief Calculate the polyhedral scop information for a given Region. - bool runOnRegion(Region *R, RGPassManager &RGM) override; + iterator begin() { return regionToScopMap.begin(); } + iterator end() { return regionToScopMap.end(); } + + /// @brief Calculate all the polyhedral scops for a given function. + bool runOnFunction(Function &F) override; - void releaseMemory() override { SI.reset(); } + void releaseMemory() override { + for (auto &it : regionToScopMap) { + it.second.reset(); + } + regionToScopMap.clear(); + } void print(raw_ostream &O, const Module *M = nullptr) const override; @@ -2527,6 +2579,7 @@ namespace llvm { class PassRegistry; void initializeScopInfoRegionPassPass(llvm::PassRegistry &); +void initializeScopInfoWrapperPassPass(llvm::PassRegistry &); } #endif Index: lib/Analysis/ScopInfo.cpp =================================================================== --- lib/Analysis/ScopInfo.cpp +++ lib/Analysis/ScopInfo.cpp @@ -4236,8 +4236,8 @@ return L->getLoopDepth() - OuterLoop->getLoopDepth(); } -void ScopInfo::buildPHIAccesses(PHINode *PHI, Region *NonAffineSubRegion, - bool IsExitBlock) { +void ScopBuilder::buildPHIAccesses(PHINode *PHI, 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 @@ -4272,7 +4272,7 @@ } } -void ScopInfo::buildScalarDependences(Instruction *Inst) { +void ScopBuilder::buildScalarDependences(Instruction *Inst) { assert(!isa(Inst)); // Pull-in required operands. @@ -4280,7 +4280,7 @@ ensureValueRead(Op.get(), Inst->getParent()); } -void ScopInfo::buildEscapingDependences(Instruction *Inst) { +void ScopBuilder::buildEscapingDependences(Instruction *Inst) { // Check for uses of this instruction outside the scop. Because we do not // iterate over such instructions and therefore did not "ensure" the existence // of a write, we must determine such use here. @@ -4307,7 +4307,7 @@ } } -bool ScopInfo::buildAccessMultiDimFixed(MemAccInst Inst, Loop *L) { +bool ScopBuilder::buildAccessMultiDimFixed(MemAccInst Inst, Loop *L) { Value *Val = Inst.getValueOperand(); Type *ElementType = Val->getType(); Value *Address = Inst.getPointerOperand(); @@ -4374,7 +4374,7 @@ return true; } -bool ScopInfo::buildAccessMultiDimParam(MemAccInst Inst, Loop *L) { +bool ScopBuilder::buildAccessMultiDimParam(MemAccInst Inst, Loop *L) { if (!PollyDelinearize) return false; @@ -4416,7 +4416,7 @@ return true; } -bool ScopInfo::buildAccessMemIntrinsic(MemAccInst Inst, Loop *L) { +bool ScopBuilder::buildAccessMemIntrinsic(MemAccInst Inst, Loop *L) { auto *MemIntr = dyn_cast_or_null(Inst); if (MemIntr == nullptr) @@ -4480,7 +4480,7 @@ return true; } -bool ScopInfo::buildAccessCallInst(MemAccInst Inst, Loop *L) { +bool ScopBuilder::buildAccessCallInst(MemAccInst Inst, Loop *L) { auto *CI = dyn_cast_or_null(Inst); if (CI == nullptr) @@ -4523,7 +4523,7 @@ return true; } -void ScopInfo::buildAccessSingleDim(MemAccInst Inst, Loop *L) { +void ScopBuilder::buildAccessSingleDim(MemAccInst Inst, Loop *L) { Value *Address = Inst.getPointerOperand(); Value *Val = Inst.getValueOperand(); Type *ElementType = Val->getType(); @@ -4563,7 +4563,7 @@ {AccessFunction}, {}, Val); } -void ScopInfo::buildMemoryAccess(MemAccInst Inst, Loop *L) { +void ScopBuilder::buildMemoryAccess(MemAccInst Inst, Loop *L) { if (buildAccessMemIntrinsic(Inst, L)) return; @@ -4580,7 +4580,7 @@ buildAccessSingleDim(Inst, L); } -void ScopInfo::buildAccessFunctions(Region &SR) { +void ScopBuilder::buildAccessFunctions(Region &SR) { if (scop->isNonAffineSubRegion(&SR)) { for (BasicBlock *BB : SR.blocks()) @@ -4595,7 +4595,7 @@ buildAccessFunctions(*I->getNodeAs()); } -void ScopInfo::buildStmts(Region &SR) { +void ScopBuilder::buildStmts(Region &SR) { if (scop->isNonAffineSubRegion(&SR)) { scop->addScopStmt(nullptr, &SR); @@ -4609,8 +4609,9 @@ scop->addScopStmt(I->getNodeAs(), nullptr); } -void ScopInfo::buildAccessFunctions(BasicBlock &BB, Region *NonAffineSubRegion, - bool IsExitBlock) { +void ScopBuilder::buildAccessFunctions(BasicBlock &BB, + Region *NonAffineSubRegion, + bool IsExitBlock) { // We do not build access functions for error blocks, as they may contain // instructions we can not model. if (isErrorBlock(BB, scop->getRegion(), LI, DT) && !IsExitBlock) @@ -4645,13 +4646,11 @@ } } -MemoryAccess *ScopInfo::addMemoryAccess(BasicBlock *BB, Instruction *Inst, - MemoryAccess::AccessType AccType, - Value *BaseAddress, Type *ElementType, - bool Affine, Value *AccessValue, - ArrayRef Subscripts, - ArrayRef Sizes, - ScopArrayInfo::MemoryKind Kind) { +MemoryAccess *ScopBuilder::addMemoryAccess( + BasicBlock *BB, Instruction *Inst, MemoryAccess::AccessType AccType, + Value *BaseAddress, Type *ElementType, bool Affine, Value *AccessValue, + ArrayRef Subscripts, ArrayRef Sizes, + ScopArrayInfo::MemoryKind Kind) { ScopStmt *Stmt = scop->getStmtFor(BB); // Do not create a memory access for anything not in the SCoP. It would be @@ -4693,19 +4692,17 @@ return &AccList.back(); } -void ScopInfo::addArrayAccess(MemAccInst MemAccInst, - MemoryAccess::AccessType AccType, - Value *BaseAddress, Type *ElementType, - bool IsAffine, ArrayRef Subscripts, - ArrayRef Sizes, - Value *AccessValue) { +void ScopBuilder::addArrayAccess( + MemAccInst MemAccInst, MemoryAccess::AccessType AccType, Value *BaseAddress, + Type *ElementType, bool IsAffine, ArrayRef Subscripts, + ArrayRef Sizes, Value *AccessValue) { ArrayBasePointers.insert(BaseAddress); addMemoryAccess(MemAccInst->getParent(), MemAccInst, AccType, BaseAddress, ElementType, IsAffine, AccessValue, Subscripts, Sizes, ScopArrayInfo::MK_Array); } -void ScopInfo::ensureValueWrite(Instruction *Inst) { +void ScopBuilder::ensureValueWrite(Instruction *Inst) { ScopStmt *Stmt = scop->getStmtFor(Inst); // Inst not defined within this SCoP. @@ -4721,7 +4718,7 @@ ArrayRef(), ScopArrayInfo::MK_Value); } -void ScopInfo::ensureValueRead(Value *V, BasicBlock *UserBB) { +void ScopBuilder::ensureValueRead(Value *V, BasicBlock *UserBB) { // There cannot be an "access" for literal constants. BasicBlock references // (jump destinations) also never change. @@ -4776,8 +4773,8 @@ ensureValueWrite(ValueInst); } -void ScopInfo::ensurePHIWrite(PHINode *PHI, BasicBlock *IncomingBlock, - Value *IncomingValue, bool IsExitBlock) { +void ScopBuilder::ensurePHIWrite(PHINode *PHI, BasicBlock *IncomingBlock, + Value *IncomingValue, bool IsExitBlock) { // As the incoming block might turn out to be an error statement ensure we // will create an exit PHI SAI object. It is needed during code generation // and would be created later anyway. @@ -4812,13 +4809,13 @@ Acc->addIncoming(IncomingBlock, IncomingValue); } -void ScopInfo::addPHIReadAccess(PHINode *PHI) { +void ScopBuilder::addPHIReadAccess(PHINode *PHI) { addMemoryAccess(PHI->getParent(), PHI, MemoryAccess::READ, PHI, PHI->getType(), true, PHI, ArrayRef(), ArrayRef(), ScopArrayInfo::MK_PHI); } -void ScopInfo::buildScop(Region &R, AssumptionCache &AC) { +void ScopBuilder::buildScop(Region &R, AssumptionCache &AC) { scop.reset(new Scop(R, SE, LI, *SD.getDetectionContext(&R))); buildStmts(R); @@ -4845,9 +4842,9 @@ scop->init(AA, AC, DT, LI); } -ScopInfo::ScopInfo(Region *R, AssumptionCache &AC, AliasAnalysis &AA, - const DataLayout &DL, DominatorTree &DT, LoopInfo &LI, - ScopDetection &SD, ScalarEvolution &SE) +ScopBuilder::ScopBuilder(Region *R, AssumptionCache &AC, AliasAnalysis &AA, + const DataLayout &DL, DominatorTree &DT, LoopInfo &LI, + ScopDetection &SD, ScalarEvolution &SE) : AA(AA), DL(DL), DT(DT), LI(LI), SD(SD), SE(SE) { Function *F = R->getEntry()->getParent(); @@ -4874,9 +4871,12 @@ emitOptimizationRemarkAnalysis(F->getContext(), DEBUG_TYPE, *F, End, Msg); } -void ScopInfo::clear() { scop.reset(); } +void ScopBuilder::clear() { scop.reset(); } //===----------------------------------------------------------------------===// +/// Implementation of ScopInfoRegion pass begins here. +// + void ScopInfoRegionPass::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); AU.addRequired(); @@ -4902,19 +4902,20 @@ auto &DT = getAnalysis().getDomTree(); auto &AC = getAnalysis().getAssumptionCache(*F); - SI.reset(new ScopInfo(R, AC, AA, DL, DT, LI, SD, SE)); + ScopBuilder *SB; + SB = new ScopBuilder(R, AC, AA, DL, DT, LI, SD, SE); + if (SB) { + scop = SB->getScop(); // take ownership of scop object + SB = nullptr; + } return false; } void ScopInfoRegionPass::print(raw_ostream &OS, const Module *) const { - Scop *scop; - if (SI) { - if ((scop = SI->getScop())) { - scop->print(OS); - return; - } - } - OS << "Invalid Scop!\n"; + if (scop) + scop->print(OS); + else + OS << "Invalid Scop!\n"; } char ScopInfoRegionPass::ID = 0; @@ -4934,3 +4935,76 @@ INITIALIZE_PASS_END(ScopInfoRegionPass, "polly-scops", "Polly - Create polyhedral description of Scops", false, false) + +//===----------------------------------------------------------------------===// +/// Implementation of ScopInfoRegion pass ends here. + +//===----------------------------------------------------------------------===// +/// Implementation of ScopInfoWrapperPass begins here. +// + +void ScopInfoWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired(); + AU.addRequired(); + AU.addRequired(); + AU.addRequiredTransitive(); + AU.addRequiredTransitive(); + AU.addRequired(); + AU.addRequired(); + AU.setPreservesAll(); +} + +bool ScopInfoWrapperPass::runOnFunction(Function &F) { + auto &SD = getAnalysis(); + ScopBuilder *SB; + Region *R; + + auto &SE = getAnalysis().getSE(); + auto &LI = getAnalysis().getLoopInfo(); + auto &AA = getAnalysis().getAAResults(); + auto const &DL = F.getParent()->getDataLayout(); + auto &DT = getAnalysis().getDomTree(); + auto &AC = getAnalysis().getAssumptionCache(F); + + /// Create polyhedral descripton of scops for all the valid regions of a + /// function. + for (ScopDetection::iterator I = SD.begin(), E = SD.end(); I != E; ++I) { + R = const_cast(*I); + if (!SD.isMaxRegionInScop(*R)) + continue; + + SB = new ScopBuilder(R, AC, AA, DL, DT, LI, SD, SE); + if (SB) + regionToScopMap.insert(std::make_pair(R, SB->getScop())); + } + return false; +} + +void ScopInfoWrapperPass::print(raw_ostream &OS, const Module *) const { + for (auto &it : regionToScopMap) { + if (it.second) + it.second->print(OS); + } +} + +char ScopInfoWrapperPass::ID = 0; + +Pass *polly::createScopInfoWrapperPassPass() { + return new ScopInfoWrapperPass(); +} + +INITIALIZE_PASS_BEGIN( + ScopInfoWrapperPass, "polly-scops-all", + "Polly - Create polyhedral description of all Scops of a function", false, + false); +INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass); +INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker); +INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass); +INITIALIZE_PASS_DEPENDENCY(RegionInfoPass); +INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass); +INITIALIZE_PASS_DEPENDENCY(ScopDetection); +INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass); +INITIALIZE_PASS_END( + ScopInfoWrapperPass, "polly-scops-all", + "Polly - Create polyhedral description of all Scops of a function", false, + false) Index: lib/Support/RegisterPasses.cpp =================================================================== --- lib/Support/RegisterPasses.cpp +++ lib/Support/RegisterPasses.cpp @@ -155,6 +155,7 @@ initializePollyCanonicalizePass(Registry); initializeScopDetectionPass(Registry); initializeScopInfoRegionPassPass(Registry); + initializeScopInfoWrapperPassPass(Registry); initializeCodegenCleanupPass(Registry); } @@ -200,6 +201,7 @@ PM.add(polly::createDOTOnlyPrinterPass()); PM.add(polly::createScopInfoRegionPassPass()); + PM.add(polly::createScopInfoWrapperPassPass()); if (ImportJScop) PM.add(polly::createJSONImporterPass()); Index: test/ScopInfo/scalar.ll =================================================================== --- test/ScopInfo/scalar.ll +++ test/ScopInfo/scalar.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -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" Index: test/ScopInfo/scalar_dependence_cond_br.ll =================================================================== --- test/ScopInfo/scalar_dependence_cond_br.ll +++ test/ScopInfo/scalar_dependence_cond_br.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -analyze < %s | FileCheck %s ; ; void f(int *A, int c, int d) { ; for (int i = 0; i < 1024; i++) Index: test/ScopInfo/schedule-const-post-dominator-walk-2.ll =================================================================== --- test/ScopInfo/schedule-const-post-dominator-walk-2.ll +++ test/ScopInfo/schedule-const-post-dominator-walk-2.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -analyze -polly-scops < %s | FileCheck %s +; RUN: opt %loadPolly -analyze -polly-scops-all < %s | FileCheck %s ; CHECK: Stmt_loopA[i0] -> [0, 0, 0] ; CHECK-DAG: Stmt_loopB[i0] -> [0, 0, 1] Index: test/ScopInfo/schedule-const-post-dominator-walk.ll =================================================================== --- test/ScopInfo/schedule-const-post-dominator-walk.ll +++ test/ScopInfo/schedule-const-post-dominator-walk.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -analyze -polly-scops < %s | FileCheck %s +; RUN: opt %loadPolly -analyze -polly-scops-all < %s | FileCheck %s ; CHECK: { Stmt_bb3[i0] -> [0, 0] }; ; CHECK: { Stmt_bb2[] -> [1, 0] }; Index: test/ScopInfo/schedule-constuction-endless-loop1.ll =================================================================== --- test/ScopInfo/schedule-constuction-endless-loop1.ll +++ test/ScopInfo/schedule-constuction-endless-loop1.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -analyze < %s | FileCheck %s ; ; Check that we do not build a SCoP and do not crash. ; Index: test/ScopInfo/schedule-constuction-endless-loop2.ll =================================================================== --- test/ScopInfo/schedule-constuction-endless-loop2.ll +++ test/ScopInfo/schedule-constuction-endless-loop2.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -analyze < %s | FileCheck %s ; ; Check that we do not build a SCoP and do not crash. ; Index: test/ScopInfo/wraping_signed_expr_0.ll =================================================================== --- test/ScopInfo/wraping_signed_expr_0.ll +++ test/ScopInfo/wraping_signed_expr_0.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -analyze < %s | FileCheck %s ; ; void f(int *A, char N, char p) { ; for (char i = 0; i < N; i++) { Index: test/ScopInfo/wraping_signed_expr_2.ll =================================================================== --- test/ScopInfo/wraping_signed_expr_2.ll +++ test/ScopInfo/wraping_signed_expr_2.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -analyze < %s | FileCheck %s ; ; void f(int *A, int N, int p) { ; for (int i = 0; i < N; i++) Index: test/ScopInfo/wraping_signed_expr_3.ll =================================================================== --- test/ScopInfo/wraping_signed_expr_3.ll +++ test/ScopInfo/wraping_signed_expr_3.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -analyze < %s | FileCheck %s ; ; void f(int *A, int N, int p) { ; for (int i = 0; i < N; i++) Index: test/ScopInfo/wraping_signed_expr_4.ll =================================================================== --- test/ScopInfo/wraping_signed_expr_4.ll +++ test/ScopInfo/wraping_signed_expr_4.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -analyze < %s | FileCheck %s ; ; void f(char *A, char N, char p) { ; for (char i = 0; i < N; i++) Index: test/ScopInfo/wraping_signed_expr_5.ll =================================================================== --- test/ScopInfo/wraping_signed_expr_5.ll +++ test/ScopInfo/wraping_signed_expr_5.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -analyze < %s | FileCheck %s ; ; We should not generate runtime check for ((int)r1 + (int)r2) as it is known not ; to overflow. However (p + q) can, thus checks are needed. Index: test/ScopInfo/wraping_signed_expr_6.ll =================================================================== --- test/ScopInfo/wraping_signed_expr_6.ll +++ test/ScopInfo/wraping_signed_expr_6.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -analyze < %s | FileCheck %s ; ; CHECK: Invalid Context: ; CHECK: [N] -> { : N >= 129 } Index: test/ScopInfo/wraping_signed_expr_7.ll =================================================================== --- test/ScopInfo/wraping_signed_expr_7.ll +++ test/ScopInfo/wraping_signed_expr_7.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-scops-all -analyze < %s | FileCheck %s ; ; CHECK: Invalid Context: ; CHECK: [N] -> { : N >= 129 }