diff options
| author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-03-04 22:43:40 +0000 |
|---|---|---|
| committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-03-04 22:43:40 +0000 |
| commit | f6557f98a24041358781ba6bdaa2f7870700377e (patch) | |
| tree | 7c417bfb12ddef0690a7e901e7b3f3c379e1fdf4 | |
| parent | eca51517808d0c4cec9a886f1d0d1c22ab31006f (diff) | |
| download | bcm5719-llvm-f6557f98a24041358781ba6bdaa2f7870700377e.tar.gz bcm5719-llvm-f6557f98a24041358781ba6bdaa2f7870700377e.zip | |
Rename the Dependences pass to DependenceInfo [NFC]
We rename the Dependences pass to DependenceInfo as a first step to a
caching pass policy. The new DependenceInfo pass will later provide
"Dependences" for a SCoP.
To keep consistency the test folder is renamed too.
llvm-svn: 231308
| -rw-r--r-- | polly/include/polly/DependenceInfo.h (renamed from polly/include/polly/Dependences.h) | 8 | ||||
| -rw-r--r-- | polly/include/polly/LinkAllPasses.h | 4 | ||||
| -rw-r--r-- | polly/lib/Analysis/DependenceInfo.cpp (renamed from polly/lib/Analysis/Dependences.cpp) | 49 | ||||
| -rw-r--r-- | polly/lib/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | polly/lib/CodeGen/IslAst.cpp | 23 | ||||
| -rw-r--r-- | polly/lib/CodeGen/IslCodeGeneration.cpp | 6 | ||||
| -rw-r--r-- | polly/lib/Exchange/JSONExporter.cpp | 12 | ||||
| -rw-r--r-- | polly/lib/Makefile | 2 | ||||
| -rw-r--r-- | polly/lib/Support/RegisterPasses.cpp | 4 | ||||
| -rw-r--r-- | polly/lib/Transform/DeadCodeElimination.cpp | 10 | ||||
| -rw-r--r-- | polly/lib/Transform/Pluto.cpp | 12 | ||||
| -rw-r--r-- | polly/lib/Transform/ScheduleOptimizer.cpp | 22 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/computeout.ll (renamed from polly/test/Dependences/computeout.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/do_pluto_matmult.ll (renamed from polly/test/Dependences/do_pluto_matmult.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_complex_location.ll (renamed from polly/test/Dependences/reduction_complex_location.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_dependences_equal_non_reduction_dependences.ll (renamed from polly/test/Dependences/reduction_dependences_equal_non_reduction_dependences.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_mixed_reduction_and_non_reduction_dependences.ll (renamed from polly/test/Dependences/reduction_mixed_reduction_and_non_reduction_dependences.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_multiple_loops_array_sum.ll (renamed from polly/test/Dependences/reduction_multiple_loops_array_sum.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_multiple_loops_array_sum_2.ll (renamed from polly/test/Dependences/reduction_multiple_loops_array_sum_2.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_multiple_loops_array_sum_3.ll (renamed from polly/test/Dependences/reduction_multiple_loops_array_sum_3.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_multiple_reductions.ll (renamed from polly/test/Dependences/reduction_multiple_reductions.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_multiple_reductions_2.ll (renamed from polly/test/Dependences/reduction_multiple_reductions_2.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_only_reduction_like_access.ll (renamed from polly/test/Dependences/reduction_only_reduction_like_access.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_partially_escaping_intermediate_in_other_stmt.ll (renamed from polly/test/Dependences/reduction_partially_escaping_intermediate_in_other_stmt.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_privatization_deps.ll (renamed from polly/test/Dependences/reduction_privatization_deps.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_privatization_deps_2.ll (renamed from polly/test/Dependences/reduction_privatization_deps_2.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_privatization_deps_3.ll (renamed from polly/test/Dependences/reduction_privatization_deps_3.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_privatization_deps_4.ll (renamed from polly/test/Dependences/reduction_privatization_deps_4.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_privatization_deps_5.ll (renamed from polly/test/Dependences/reduction_privatization_deps_5.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_simple_iv.ll (renamed from polly/test/Dependences/reduction_simple_iv.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_simple_iv_debug_wrapped_dependences.ll (renamed from polly/test/Dependences/reduction_simple_iv_debug_wrapped_dependences.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_simple_privatization_deps_2.ll (renamed from polly/test/Dependences/reduction_simple_privatization_deps_2.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_simple_privatization_deps_w_parameter.ll (renamed from polly/test/Dependences/reduction_simple_privatization_deps_w_parameter.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/reduction_two_reductions_different_rloops.ll (renamed from polly/test/Dependences/reduction_two_reductions_different_rloops.ll) | 0 | ||||
| -rw-r--r-- | polly/test/DependenceInfo/sequential_loops.ll (renamed from polly/test/Dependences/sequential_loops.ll) | 0 |
35 files changed, 78 insertions, 76 deletions
diff --git a/polly/include/polly/Dependences.h b/polly/include/polly/DependenceInfo.h index 9bbddb6ac0d..432ba33f0d8 100644 --- a/polly/include/polly/Dependences.h +++ b/polly/include/polly/DependenceInfo.h @@ -1,4 +1,4 @@ -//===------ polly/Dependences.h - Polyhedral dependency analysis *- C++ -*-===// +//===--- polly/DependenceInfo.h - Polyhedral dependency analysis *- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -43,7 +43,7 @@ class Scop; class ScopStmt; class MemoryAccess; -class Dependences : public ScopPass { +class DependenceInfo : public ScopPass { public: static char ID; @@ -77,7 +77,7 @@ public: typedef std::map<ScopStmt *, isl_map *> StatementToIslMapTy; - Dependences(); + DependenceInfo(); /// @brief Check if a new scattering is valid. /// @@ -165,7 +165,7 @@ private: namespace llvm { class PassRegistry; -void initializeDependencesPass(llvm::PassRegistry &); +void initializeDependenceInfoPass(llvm::PassRegistry &); } #endif diff --git a/polly/include/polly/LinkAllPasses.h b/polly/include/polly/LinkAllPasses.h index 3853b5560a9..e4b646dc404 100644 --- a/polly/include/polly/LinkAllPasses.h +++ b/polly/include/polly/LinkAllPasses.h @@ -28,7 +28,7 @@ class RegionPass; namespace polly { llvm::Pass *createCodePreparationPass(); llvm::Pass *createDeadCodeElimPass(); -llvm::Pass *createDependencesPass(); +llvm::Pass *createDependenceInfoPass(); llvm::Pass *createDOTOnlyPrinterPass(); llvm::Pass *createDOTOnlyViewerPass(); llvm::Pass *createDOTPrinterPass(); @@ -63,7 +63,7 @@ struct PollyForcePassLinking { polly::createCodePreparationPass(); polly::createDeadCodeElimPass(); - polly::createDependencesPass(); + polly::createDependenceInfoPass(); polly::createDOTOnlyPrinterPass(); polly::createDOTOnlyViewerPass(); polly::createDOTPrinterPass(); diff --git a/polly/lib/Analysis/Dependences.cpp b/polly/lib/Analysis/DependenceInfo.cpp index 437b365fe18..8fb79dd6727 100644 --- a/polly/lib/Analysis/Dependences.cpp +++ b/polly/lib/Analysis/DependenceInfo.cpp @@ -20,7 +20,7 @@ // //===----------------------------------------------------------------------===// // -#include "polly/Dependences.h" +#include "polly/DependenceInfo.h" #include "polly/LinkAllPasses.h" #include "polly/Options.h" #include "polly/ScopInfo.h" @@ -63,12 +63,13 @@ static cl::opt<enum AnalysisType> OptAnalysisType( cl::cat(PollyCategory)); //===----------------------------------------------------------------------===// -Dependences::Dependences() : ScopPass(ID) { RAW = WAR = WAW = nullptr; } +DependenceInfo::DependenceInfo() : ScopPass(ID) { RAW = WAR = WAW = nullptr; } -void Dependences::collectInfo(Scop &S, isl_union_map **Read, - isl_union_map **Write, isl_union_map **MayWrite, - isl_union_map **AccessSchedule, - isl_union_map **StmtSchedule) { +void DependenceInfo::collectInfo(Scop &S, isl_union_map **Read, + isl_union_map **Write, + isl_union_map **MayWrite, + isl_union_map **AccessSchedule, + isl_union_map **StmtSchedule) { isl_space *Space = S.getParamSpace(); *Read = isl_union_map_empty(isl_space_copy(Space)); *Write = isl_union_map_empty(isl_space_copy(Space)); @@ -173,7 +174,7 @@ static int fixSetToZero(__isl_take isl_set *Zero, void *user) { /// /// Note: This function also computes the (reverse) transitive closure of the /// reduction dependences. -void Dependences::addPrivatizationDependences() { +void DependenceInfo::addPrivatizationDependences() { isl_union_map *PrivRAW, *PrivWAW, *PrivWAR; // The transitive closure might be over approximated, thus could lead to @@ -216,7 +217,7 @@ void Dependences::addPrivatizationDependences() { isl_union_set_free(Universe); } -void Dependences::calculateDependences(Scop &S) { +void DependenceInfo::calculateDependences(Scop &S) { isl_union_map *Read, *Write, *MayWrite, *AccessSchedule, *StmtSchedule, *Schedule; @@ -432,18 +433,18 @@ void Dependences::calculateDependences(Scop &S) { DEBUG(printScop(dbgs(), S)); } -void Dependences::recomputeDependences() { +void DependenceInfo::recomputeDependences() { releaseMemory(); calculateDependences(*S); } -bool Dependences::runOnScop(Scop &ScopVar) { +bool DependenceInfo::runOnScop(Scop &ScopVar) { S = &ScopVar; recomputeDependences(); return false; } -bool Dependences::isValidScattering(StatementToIslMapTy *NewScattering) { +bool DependenceInfo::isValidScattering(StatementToIslMapTy *NewScattering) { Scop &S = *this->S; if (LegalityCheckDisabled) @@ -501,8 +502,8 @@ bool Dependences::isValidScattering(StatementToIslMapTy *NewScattering) { // dimension, then the loop is parallel. The distance is zero in the current // dimension if it is a subset of a map with equal values for the current // dimension. -bool Dependences::isParallel(isl_union_map *Schedule, isl_union_map *Deps, - isl_pw_aff **MinDistancePtr) { +bool DependenceInfo::isParallel(isl_union_map *Schedule, isl_union_map *Deps, + isl_pw_aff **MinDistancePtr) { isl_set *Deltas, *Distance; isl_map *ScheduleDeps; unsigned Dimension; @@ -556,7 +557,7 @@ static void printDependencyMap(raw_ostream &OS, __isl_keep isl_union_map *DM) { OS << "n/a\n"; } -void Dependences::printScop(raw_ostream &OS, Scop &) const { +void DependenceInfo::printScop(raw_ostream &OS, Scop &) const { OS << "\tRAW dependences:\n\t\t"; printDependencyMap(OS, RAW); OS << "\tWAR dependences:\n\t\t"; @@ -569,7 +570,7 @@ void Dependences::printScop(raw_ostream &OS, Scop &) const { printDependencyMap(OS, TC_RED); } -void Dependences::releaseMemory() { +void DependenceInfo::releaseMemory() { isl_union_map_free(RAW); isl_union_map_free(WAR); isl_union_map_free(WAW); @@ -583,7 +584,7 @@ void Dependences::releaseMemory() { ReductionDependences.clear(); } -isl_union_map *Dependences::getDependences(int Kinds) { +isl_union_map *DependenceInfo::getDependences(int Kinds) { assert(hasValidDependences() && "No valid dependences available"); isl_space *Space = isl_union_map_get_space(RAW); isl_union_map *Deps = isl_union_map_empty(Space); @@ -608,30 +609,30 @@ isl_union_map *Dependences::getDependences(int Kinds) { return Deps; } -bool Dependences::hasValidDependences() { +bool DependenceInfo::hasValidDependences() { return (RAW != nullptr) && (WAR != nullptr) && (WAW != nullptr); } -isl_map *Dependences::getReductionDependences(MemoryAccess *MA) { +isl_map *DependenceInfo::getReductionDependences(MemoryAccess *MA) { return isl_map_copy(ReductionDependences[MA]); } -void Dependences::setReductionDependences(MemoryAccess *MA, isl_map *D) { +void DependenceInfo::setReductionDependences(MemoryAccess *MA, isl_map *D) { assert(ReductionDependences.count(MA) == 0 && "Reduction dependences set twice!"); ReductionDependences[MA] = D; } -void Dependences::getAnalysisUsage(AnalysisUsage &AU) const { +void DependenceInfo::getAnalysisUsage(AnalysisUsage &AU) const { ScopPass::getAnalysisUsage(AU); } -char Dependences::ID = 0; +char DependenceInfo::ID = 0; -Pass *polly::createDependencesPass() { return new Dependences(); } +Pass *polly::createDependenceInfoPass() { return new DependenceInfo(); } -INITIALIZE_PASS_BEGIN(Dependences, "polly-dependences", +INITIALIZE_PASS_BEGIN(DependenceInfo, "polly-dependences", "Polly - Calculate dependences", false, false); INITIALIZE_PASS_DEPENDENCY(ScopInfo); -INITIALIZE_PASS_END(Dependences, "polly-dependences", +INITIALIZE_PASS_END(DependenceInfo, "polly-dependences", "Polly - Calculate dependences", false, false) diff --git a/polly/lib/CMakeLists.txt b/polly/lib/CMakeLists.txt index c7916c9760b..7aedbb11daf 100644 --- a/polly/lib/CMakeLists.txt +++ b/polly/lib/CMakeLists.txt @@ -104,7 +104,7 @@ set (ISL_FILES add_polly_library(Polly - Analysis/Dependences.cpp + Analysis/DependenceInfo.cpp Analysis/ScopDetection.cpp Analysis/ScopDetectionDiagnostic.cpp Analysis/ScopInfo.cpp diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp index 3a240646a5c..666d7fd9158 100644 --- a/polly/lib/CodeGen/IslAst.cpp +++ b/polly/lib/CodeGen/IslAst.cpp @@ -21,7 +21,7 @@ #include "polly/CodeGen/CodeGeneration.h" #include "polly/CodeGen/IslAst.h" -#include "polly/Dependences.h" +#include "polly/DependenceInfo.h" #include "polly/LinkAllPasses.h" #include "polly/Options.h" #include "polly/ScopInfo.h" @@ -73,7 +73,7 @@ static cl::opt<bool> NoEarlyExit( namespace polly { class IslAst { public: - IslAst(Scop *Scop, Dependences &D); + IslAst(Scop *Scop, DependenceInfo &D); ~IslAst(); @@ -111,7 +111,7 @@ struct AstBuildUserInfo { : Deps(nullptr), InParallelFor(false), LastForNodeId(nullptr) {} /// @brief The dependence information used for the parallelism check. - Dependences *Deps; + DependenceInfo *Deps; /// @brief Flag to indicate that we are inside a parallel for node. bool InParallelFor; @@ -197,20 +197,21 @@ static isl_printer *cbPrintFor(__isl_take isl_printer *Printer, /// we can perform the parallelism check as we are only interested in a zero /// (or non-zero) dependence distance on the dimension in question. static bool astScheduleDimIsParallel(__isl_keep isl_ast_build *Build, - Dependences *D, + DependenceInfo *D, IslAstUserPayload *NodeInfo) { if (!D->hasValidDependences()) return false; isl_union_map *Schedule = isl_ast_build_get_schedule(Build); - isl_union_map *Deps = D->getDependences( - Dependences::TYPE_RAW | Dependences::TYPE_WAW | Dependences::TYPE_WAR); + isl_union_map *Deps = + D->getDependences(DependenceInfo::TYPE_RAW | DependenceInfo::TYPE_WAW | + DependenceInfo::TYPE_WAR); if (!D->isParallel(Schedule, Deps, &NodeInfo->MinimalDependenceDistance) && !isl_union_map_free(Schedule)) return false; - isl_union_map *RedDeps = D->getDependences(Dependences::TYPE_TC_RED); + isl_union_map *RedDeps = D->getDependences(DependenceInfo::TYPE_TC_RED); if (!D->isParallel(Schedule, RedDeps)) NodeInfo->IsReductionParallel = true; @@ -362,7 +363,7 @@ static bool benefitsFromPolly(Scop *Scop, bool PerformParallelTest) { return true; } -IslAst::IslAst(Scop *Scop, Dependences &D) +IslAst::IslAst(Scop *Scop, DependenceInfo &D) : S(Scop), Root(nullptr), RunCondition(nullptr) { bool PerformParallelTest = PollyParallel || DetectParallel || @@ -427,7 +428,7 @@ bool IslAstInfo::runOnScop(Scop &Scop) { S = &Scop; - Dependences &D = getAnalysis<Dependences>(); + DependenceInfo &D = getAnalysis<DependenceInfo>(); Ast = new IslAst(&Scop, D); @@ -567,7 +568,7 @@ void IslAstInfo::getAnalysisUsage(AnalysisUsage &AU) const { // Get the Common analysis usage of ScopPasses. ScopPass::getAnalysisUsage(AU); AU.addRequired<ScopInfo>(); - AU.addRequired<Dependences>(); + AU.addRequired<DependenceInfo>(); } char IslAstInfo::ID = 0; @@ -578,6 +579,6 @@ INITIALIZE_PASS_BEGIN(IslAstInfo, "polly-ast", "Polly - Generate an AST of the SCoP (isl)", false, false); INITIALIZE_PASS_DEPENDENCY(ScopInfo); -INITIALIZE_PASS_DEPENDENCY(Dependences); +INITIALIZE_PASS_DEPENDENCY(DependenceInfo); INITIALIZE_PASS_END(IslAstInfo, "polly-ast", "Polly - Generate an AST from the SCoP (isl)", false, false) diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index a4ebd560a42..e2eed5f4eec 100644 --- a/polly/lib/CodeGen/IslCodeGeneration.cpp +++ b/polly/lib/CodeGen/IslCodeGeneration.cpp @@ -25,7 +25,7 @@ #include "polly/CodeGen/IslAst.h" #include "polly/CodeGen/LoopGenerators.h" #include "polly/CodeGen/Utils.h" -#include "polly/Dependences.h" +#include "polly/DependenceInfo.h" #include "polly/LinkAllPasses.h" #include "polly/ScopInfo.h" #include "polly/Support/GICHelper.h" @@ -1002,7 +1002,7 @@ public: AU.addRequired<ScopInfo>(); AU.addRequired<LoopInfoWrapperPass>(); - AU.addPreserved<Dependences>(); + AU.addPreserved<DependenceInfo>(); AU.addPreserved<LoopInfoWrapperPass>(); AU.addPreserved<DominatorTreeWrapperPass>(); @@ -1026,7 +1026,7 @@ Pass *polly::createIslCodeGenerationPass() { return new IslCodeGeneration(); } INITIALIZE_PASS_BEGIN(IslCodeGeneration, "polly-codegen-isl", "Polly - Create LLVM-IR from SCoPs", false, false); -INITIALIZE_PASS_DEPENDENCY(Dependences); +INITIALIZE_PASS_DEPENDENCY(DependenceInfo); INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass); INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass); INITIALIZE_PASS_DEPENDENCY(RegionInfoPass); diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp index 71b2b24d950..a7ce4c662a8 100644 --- a/polly/lib/Exchange/JSONExporter.cpp +++ b/polly/lib/Exchange/JSONExporter.cpp @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include "polly/LinkAllPasses.h" -#include "polly/Dependences.h" +#include "polly/DependenceInfo.h" #include "polly/Options.h" #include "polly/ScopInfo.h" #include "polly/ScopPass.h" @@ -178,11 +178,11 @@ void JSONImporter::printScop(raw_ostream &OS, Scop &S) const { OS << "New access function '" << *I << "'detected in JSCOP file\n"; } -typedef Dependences::StatementToIslMapTy StatementToIslMapTy; +typedef DependenceInfo::StatementToIslMapTy StatementToIslMapTy; bool JSONImporter::runOnScop(Scop &S) { Region &R = S.getRegion(); - Dependences *D = &getAnalysis<Dependences>(); + DependenceInfo *D = &getAnalysis<DependenceInfo>(); const DataLayout &DL = getAnalysis<DataLayoutPass>().getDataLayout(); std::string FileName = ImportDir + "/" + getFileName(S); @@ -355,7 +355,7 @@ bool JSONImporter::runOnScop(Scop &S) { void JSONImporter::getAnalysisUsage(AnalysisUsage &AU) const { ScopPass::getAnalysisUsage(AU); - AU.addRequired<Dependences>(); + AU.addRequired<DependenceInfo>(); AU.addRequired<DataLayoutPass>(); } Pass *polly::createJSONImporterPass() { return new JSONImporter(); } @@ -364,7 +364,7 @@ INITIALIZE_PASS_BEGIN(JSONExporter, "polly-export-jscop", "Polly - Export Scops as JSON" " (Writes a .jscop file for each Scop)", false, false); -INITIALIZE_PASS_DEPENDENCY(Dependences) +INITIALIZE_PASS_DEPENDENCY(DependenceInfo) INITIALIZE_PASS_END(JSONExporter, "polly-export-jscop", "Polly - Export Scops as JSON" " (Writes a .jscop file for each Scop)", @@ -374,7 +374,7 @@ INITIALIZE_PASS_BEGIN(JSONImporter, "polly-import-jscop", "Polly - Import Scops from JSON" " (Reads a .jscop file for each Scop)", false, false); -INITIALIZE_PASS_DEPENDENCY(Dependences) +INITIALIZE_PASS_DEPENDENCY(DependenceInfo) INITIALIZE_PASS_DEPENDENCY(DataLayoutPass) INITIALIZE_PASS_END(JSONImporter, "polly-import-jscop", "Polly - Import Scops from JSON" diff --git a/polly/lib/Makefile b/polly/lib/Makefile index 6373b0717af..cb7bb08ef25 100644 --- a/polly/lib/Makefile +++ b/polly/lib/Makefile @@ -119,7 +119,7 @@ SOURCES= Polly.cpp \ Support/SCEVValidator.cpp \ Support/RegisterPasses.cpp \ Support/ScopHelper.cpp \ - Analysis/Dependences.cpp \ + Analysis/DependenceInfo.cpp \ Analysis/ScopDetection.cpp \ Analysis/ScopDetectionDiagnostic.cpp \ Analysis/ScopInfo.cpp \ diff --git a/polly/lib/Support/RegisterPasses.cpp b/polly/lib/Support/RegisterPasses.cpp index 11b41fb8a40..f9bd326d6ad 100644 --- a/polly/lib/Support/RegisterPasses.cpp +++ b/polly/lib/Support/RegisterPasses.cpp @@ -22,7 +22,7 @@ #include "polly/RegisterPasses.h" #include "polly/Canonicalization.h" #include "polly/CodeGen/CodeGeneration.h" -#include "polly/Dependences.h" +#include "polly/DependenceInfo.h" #include "polly/LinkAllPasses.h" #include "polly/Options.h" #include "polly/ScopDetection.h" @@ -142,7 +142,7 @@ void initializePollyPasses(PassRegistry &Registry) { initializeIslCodeGenerationPass(Registry); initializeCodePreparationPass(Registry); initializeDeadCodeElimPass(Registry); - initializeDependencesPass(Registry); + initializeDependenceInfoPass(Registry); initializeIndependentBlocksPass(Registry); initializeJSONExporterPass(Registry); initializeJSONImporterPass(Registry); diff --git a/polly/lib/Transform/DeadCodeElimination.cpp b/polly/lib/Transform/DeadCodeElimination.cpp index 699a3e1adf1..e18fc2c135a 100644 --- a/polly/lib/Transform/DeadCodeElimination.cpp +++ b/polly/lib/Transform/DeadCodeElimination.cpp @@ -32,7 +32,7 @@ // //===----------------------------------------------------------------------===// -#include "polly/Dependences.h" +#include "polly/DependenceInfo.h" #include "polly/LinkAllPasses.h" #include "polly/ScopInfo.h" #include "llvm/Support/CommandLine.h" @@ -112,14 +112,14 @@ isl_union_set *DeadCodeElim::getLiveOut(Scop &S) { /// combine a certain number of precise steps with one approximating step that /// simplifies the life set with an affine hull. bool DeadCodeElim::eliminateDeadCode(Scop &S, int PreciseSteps) { - Dependences *D = &getAnalysis<Dependences>(); + DependenceInfo *D = &getAnalysis<DependenceInfo>(); if (!D->hasValidDependences()) return false; isl_union_set *Live = getLiveOut(S); isl_union_map *Dep = - D->getDependences(Dependences::TYPE_RAW | Dependences::TYPE_RED); + D->getDependences(DependenceInfo::TYPE_RAW | DependenceInfo::TYPE_RED); Dep = isl_union_map_reverse(Dep); if (PreciseSteps == -1) @@ -168,14 +168,14 @@ void DeadCodeElim::printScop(raw_ostream &, Scop &) const {} void DeadCodeElim::getAnalysisUsage(AnalysisUsage &AU) const { ScopPass::getAnalysisUsage(AU); - AU.addRequired<Dependences>(); + AU.addRequired<DependenceInfo>(); } Pass *polly::createDeadCodeElimPass() { return new DeadCodeElim(); } INITIALIZE_PASS_BEGIN(DeadCodeElim, "polly-dce", "Polly - Remove dead iterations", false, false) -INITIALIZE_PASS_DEPENDENCY(Dependences) +INITIALIZE_PASS_DEPENDENCY(DependenceInfo) INITIALIZE_PASS_DEPENDENCY(ScopInfo) INITIALIZE_PASS_END(DeadCodeElim, "polly-dce", "Polly - Remove dead iterations", false, false) diff --git a/polly/lib/Transform/Pluto.cpp b/polly/lib/Transform/Pluto.cpp index 76823ffc2a1..d4fb0d13371 100644 --- a/polly/lib/Transform/Pluto.cpp +++ b/polly/lib/Transform/Pluto.cpp @@ -15,7 +15,7 @@ #ifdef PLUTO_FOUND #include "polly/CodeGen/CodeGeneration.h" -#include "polly/Dependences.h" +#include "polly/DependenceInfo.h" #include "polly/LinkAllPasses.h" #include "polly/Options.h" #include "polly/ScopInfo.h" @@ -172,10 +172,10 @@ bool PlutoOptimizer::runOnScop(Scop &S) { isl_union_map *Deps, *ToPlutoNames, *Schedule; PlutoOptions *Options; - Dependences *D = &getAnalysis<Dependences>(); + DependenceInfo *D = &getAnalysis<DependenceInfo>(); - int DependencesKinds = - Dependences::TYPE_RAW | Dependences::TYPE_WAR | Dependences::TYPE_WAW; + int DependencesKinds = DependenceInfo::TYPE_RAW | DependenceInfo::TYPE_WAR | + DependenceInfo::TYPE_WAW; Deps = D->getDependences(DependencesKinds); Domain = S.getDomains(); @@ -254,7 +254,7 @@ void PlutoOptimizer::printScop(raw_ostream &, Scop &) const {} void PlutoOptimizer::getAnalysisUsage(AnalysisUsage &AU) const { ScopPass::getAnalysisUsage(AU); - AU.addRequired<Dependences>(); + AU.addRequired<DependenceInfo>(); } Pass *polly::createPlutoOptimizerPass() { return new PlutoOptimizer(); } @@ -262,7 +262,7 @@ Pass *polly::createPlutoOptimizerPass() { return new PlutoOptimizer(); } INITIALIZE_PASS_BEGIN(PlutoOptimizer, "polly-opt-pluto", "Polly - Optimize schedule of SCoP (Pluto)", false, false); -INITIALIZE_PASS_DEPENDENCY(Dependences); +INITIALIZE_PASS_DEPENDENCY(DependenceInfo); INITIALIZE_PASS_DEPENDENCY(ScopInfo); INITIALIZE_PASS_END(PlutoOptimizer, "polly-opt-pluto", "Polly - Optimize schedule of SCoP (Pluto)", false, false) diff --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp index 34593d9bfa9..20c4f9b1d09 100644 --- a/polly/lib/Transform/ScheduleOptimizer.cpp +++ b/polly/lib/Transform/ScheduleOptimizer.cpp @@ -26,7 +26,7 @@ #include "isl/schedule.h" #include "isl/space.h" #include "polly/CodeGen/CodeGeneration.h" -#include "polly/Dependences.h" +#include "polly/DependenceInfo.h" #include "polly/LinkAllPasses.h" #include "polly/Options.h" #include "polly/ScopInfo.h" @@ -481,7 +481,7 @@ bool IslScheduleOptimizer::runOnScop(Scop &S) { return false; } - Dependences *D = &getAnalysis<Dependences>(); + DependenceInfo *D = &getAnalysis<DependenceInfo>(); if (!D->hasValidDependences()) return false; @@ -490,20 +490,20 @@ bool IslScheduleOptimizer::runOnScop(Scop &S) { LastSchedule = nullptr; // Build input data. - int ValidityKinds = - Dependences::TYPE_RAW | Dependences::TYPE_WAR | Dependences::TYPE_WAW; + int ValidityKinds = DependenceInfo::TYPE_RAW | DependenceInfo::TYPE_WAR | + DependenceInfo::TYPE_WAW; int ProximityKinds; if (OptimizeDeps == "all") - ProximityKinds = - Dependences::TYPE_RAW | Dependences::TYPE_WAR | Dependences::TYPE_WAW; + ProximityKinds = DependenceInfo::TYPE_RAW | DependenceInfo::TYPE_WAR | + DependenceInfo::TYPE_WAW; else if (OptimizeDeps == "raw") - ProximityKinds = Dependences::TYPE_RAW; + ProximityKinds = DependenceInfo::TYPE_RAW; else { errs() << "Do not know how to optimize for '" << OptimizeDeps << "'" << " Falling back to optimizing all dependences.\n"; - ProximityKinds = - Dependences::TYPE_RAW | Dependences::TYPE_WAR | Dependences::TYPE_WAW; + ProximityKinds = DependenceInfo::TYPE_RAW | DependenceInfo::TYPE_WAR | + DependenceInfo::TYPE_WAW; } isl_union_set *Domain = S.getDomains(); @@ -648,7 +648,7 @@ void IslScheduleOptimizer::printScop(raw_ostream &OS, Scop &) const { void IslScheduleOptimizer::getAnalysisUsage(AnalysisUsage &AU) const { ScopPass::getAnalysisUsage(AU); - AU.addRequired<Dependences>(); + AU.addRequired<DependenceInfo>(); } Pass *polly::createIslScheduleOptimizerPass() { @@ -657,7 +657,7 @@ Pass *polly::createIslScheduleOptimizerPass() { INITIALIZE_PASS_BEGIN(IslScheduleOptimizer, "polly-opt-isl", "Polly - Optimize schedule of SCoP", false, false); -INITIALIZE_PASS_DEPENDENCY(Dependences); +INITIALIZE_PASS_DEPENDENCY(DependenceInfo); INITIALIZE_PASS_DEPENDENCY(ScopInfo); INITIALIZE_PASS_END(IslScheduleOptimizer, "polly-opt-isl", "Polly - Optimize schedule of SCoP", false, false) diff --git a/polly/test/Dependences/computeout.ll b/polly/test/DependenceInfo/computeout.ll index 9529c46b007..9529c46b007 100644 --- a/polly/test/Dependences/computeout.ll +++ b/polly/test/DependenceInfo/computeout.ll diff --git a/polly/test/Dependences/do_pluto_matmult.ll b/polly/test/DependenceInfo/do_pluto_matmult.ll index 1a6c5064297..1a6c5064297 100644 --- a/polly/test/Dependences/do_pluto_matmult.ll +++ b/polly/test/DependenceInfo/do_pluto_matmult.ll diff --git a/polly/test/Dependences/reduction_complex_location.ll b/polly/test/DependenceInfo/reduction_complex_location.ll index 7ae741c95b5..7ae741c95b5 100644 --- a/polly/test/Dependences/reduction_complex_location.ll +++ b/polly/test/DependenceInfo/reduction_complex_location.ll diff --git a/polly/test/Dependences/reduction_dependences_equal_non_reduction_dependences.ll b/polly/test/DependenceInfo/reduction_dependences_equal_non_reduction_dependences.ll index 5e23534c160..5e23534c160 100644 --- a/polly/test/Dependences/reduction_dependences_equal_non_reduction_dependences.ll +++ b/polly/test/DependenceInfo/reduction_dependences_equal_non_reduction_dependences.ll diff --git a/polly/test/Dependences/reduction_mixed_reduction_and_non_reduction_dependences.ll b/polly/test/DependenceInfo/reduction_mixed_reduction_and_non_reduction_dependences.ll index 9c1d77a0ce3..9c1d77a0ce3 100644 --- a/polly/test/Dependences/reduction_mixed_reduction_and_non_reduction_dependences.ll +++ b/polly/test/DependenceInfo/reduction_mixed_reduction_and_non_reduction_dependences.ll diff --git a/polly/test/Dependences/reduction_multiple_loops_array_sum.ll b/polly/test/DependenceInfo/reduction_multiple_loops_array_sum.ll index e698040ac08..e698040ac08 100644 --- a/polly/test/Dependences/reduction_multiple_loops_array_sum.ll +++ b/polly/test/DependenceInfo/reduction_multiple_loops_array_sum.ll diff --git a/polly/test/Dependences/reduction_multiple_loops_array_sum_2.ll b/polly/test/DependenceInfo/reduction_multiple_loops_array_sum_2.ll index b2897d3487c..b2897d3487c 100644 --- a/polly/test/Dependences/reduction_multiple_loops_array_sum_2.ll +++ b/polly/test/DependenceInfo/reduction_multiple_loops_array_sum_2.ll diff --git a/polly/test/Dependences/reduction_multiple_loops_array_sum_3.ll b/polly/test/DependenceInfo/reduction_multiple_loops_array_sum_3.ll index 054bab778ec..054bab778ec 100644 --- a/polly/test/Dependences/reduction_multiple_loops_array_sum_3.ll +++ b/polly/test/DependenceInfo/reduction_multiple_loops_array_sum_3.ll diff --git a/polly/test/Dependences/reduction_multiple_reductions.ll b/polly/test/DependenceInfo/reduction_multiple_reductions.ll index c023b2a8617..c023b2a8617 100644 --- a/polly/test/Dependences/reduction_multiple_reductions.ll +++ b/polly/test/DependenceInfo/reduction_multiple_reductions.ll diff --git a/polly/test/Dependences/reduction_multiple_reductions_2.ll b/polly/test/DependenceInfo/reduction_multiple_reductions_2.ll index 812a20e434b..812a20e434b 100644 --- a/polly/test/Dependences/reduction_multiple_reductions_2.ll +++ b/polly/test/DependenceInfo/reduction_multiple_reductions_2.ll diff --git a/polly/test/Dependences/reduction_only_reduction_like_access.ll b/polly/test/DependenceInfo/reduction_only_reduction_like_access.ll index fcf1e8b7ef1..fcf1e8b7ef1 100644 --- a/polly/test/Dependences/reduction_only_reduction_like_access.ll +++ b/polly/test/DependenceInfo/reduction_only_reduction_like_access.ll diff --git a/polly/test/Dependences/reduction_partially_escaping_intermediate_in_other_stmt.ll b/polly/test/DependenceInfo/reduction_partially_escaping_intermediate_in_other_stmt.ll index 063aef354ca..063aef354ca 100644 --- a/polly/test/Dependences/reduction_partially_escaping_intermediate_in_other_stmt.ll +++ b/polly/test/DependenceInfo/reduction_partially_escaping_intermediate_in_other_stmt.ll diff --git a/polly/test/Dependences/reduction_privatization_deps.ll b/polly/test/DependenceInfo/reduction_privatization_deps.ll index bc7fe45ebe7..bc7fe45ebe7 100644 --- a/polly/test/Dependences/reduction_privatization_deps.ll +++ b/polly/test/DependenceInfo/reduction_privatization_deps.ll diff --git a/polly/test/Dependences/reduction_privatization_deps_2.ll b/polly/test/DependenceInfo/reduction_privatization_deps_2.ll index aaee4afad6f..aaee4afad6f 100644 --- a/polly/test/Dependences/reduction_privatization_deps_2.ll +++ b/polly/test/DependenceInfo/reduction_privatization_deps_2.ll diff --git a/polly/test/Dependences/reduction_privatization_deps_3.ll b/polly/test/DependenceInfo/reduction_privatization_deps_3.ll index 6c34c08ef28..6c34c08ef28 100644 --- a/polly/test/Dependences/reduction_privatization_deps_3.ll +++ b/polly/test/DependenceInfo/reduction_privatization_deps_3.ll diff --git a/polly/test/Dependences/reduction_privatization_deps_4.ll b/polly/test/DependenceInfo/reduction_privatization_deps_4.ll index a65ea9acb59..a65ea9acb59 100644 --- a/polly/test/Dependences/reduction_privatization_deps_4.ll +++ b/polly/test/DependenceInfo/reduction_privatization_deps_4.ll diff --git a/polly/test/Dependences/reduction_privatization_deps_5.ll b/polly/test/DependenceInfo/reduction_privatization_deps_5.ll index dc66649696f..dc66649696f 100644 --- a/polly/test/Dependences/reduction_privatization_deps_5.ll +++ b/polly/test/DependenceInfo/reduction_privatization_deps_5.ll diff --git a/polly/test/Dependences/reduction_simple_iv.ll b/polly/test/DependenceInfo/reduction_simple_iv.ll index 0769107f4fc..0769107f4fc 100644 --- a/polly/test/Dependences/reduction_simple_iv.ll +++ b/polly/test/DependenceInfo/reduction_simple_iv.ll diff --git a/polly/test/Dependences/reduction_simple_iv_debug_wrapped_dependences.ll b/polly/test/DependenceInfo/reduction_simple_iv_debug_wrapped_dependences.ll index 4bfa4174ae1..4bfa4174ae1 100644 --- a/polly/test/Dependences/reduction_simple_iv_debug_wrapped_dependences.ll +++ b/polly/test/DependenceInfo/reduction_simple_iv_debug_wrapped_dependences.ll diff --git a/polly/test/Dependences/reduction_simple_privatization_deps_2.ll b/polly/test/DependenceInfo/reduction_simple_privatization_deps_2.ll index 3f4fa44233c..3f4fa44233c 100644 --- a/polly/test/Dependences/reduction_simple_privatization_deps_2.ll +++ b/polly/test/DependenceInfo/reduction_simple_privatization_deps_2.ll diff --git a/polly/test/Dependences/reduction_simple_privatization_deps_w_parameter.ll b/polly/test/DependenceInfo/reduction_simple_privatization_deps_w_parameter.ll index 660fe4d8669..660fe4d8669 100644 --- a/polly/test/Dependences/reduction_simple_privatization_deps_w_parameter.ll +++ b/polly/test/DependenceInfo/reduction_simple_privatization_deps_w_parameter.ll diff --git a/polly/test/Dependences/reduction_two_reductions_different_rloops.ll b/polly/test/DependenceInfo/reduction_two_reductions_different_rloops.ll index 033afa125c2..033afa125c2 100644 --- a/polly/test/Dependences/reduction_two_reductions_different_rloops.ll +++ b/polly/test/DependenceInfo/reduction_two_reductions_different_rloops.ll diff --git a/polly/test/Dependences/sequential_loops.ll b/polly/test/DependenceInfo/sequential_loops.ll index 5e11359ede0..5e11359ede0 100644 --- a/polly/test/Dependences/sequential_loops.ll +++ b/polly/test/DependenceInfo/sequential_loops.ll |

