[polly] r213457 - Update for RegionInfo changes.
Matt Arsenault
Matthew.Arsenault at amd.com
Sat Jul 19 11:40:18 PDT 2014
Author: arsenm
Date: Sat Jul 19 13:40:17 2014
New Revision: 213457
URL: http://llvm.org/viewvc/llvm-project?rev=213457&view=rev
Log:
Update for RegionInfo changes.
Mostly related to missing includes and renaming of
the pass to RegionInfoPass.
Modified:
polly/trunk/lib/Analysis/ScopDetection.cpp
polly/trunk/lib/Analysis/ScopGraphPrinter.cpp
polly/trunk/lib/Analysis/ScopInfo.cpp
polly/trunk/lib/Analysis/TempScopInfo.cpp
polly/trunk/lib/CodeGen/CodeGeneration.cpp
polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
polly/trunk/lib/CodeGen/Utils.cpp
polly/trunk/lib/Support/ScopHelper.cpp
polly/trunk/lib/Transform/CodePreparation.cpp
polly/trunk/lib/Transform/IndependentBlocks.cpp
Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=213457&r1=213456&r2=213457&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Sat Jul 19 13:40:17 2014
@@ -54,6 +54,7 @@
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
+#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/RegionIterator.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
@@ -819,7 +820,7 @@ void ScopDetection::emitMissedRemarksFor
bool ScopDetection::runOnFunction(llvm::Function &F) {
LI = &getAnalysis<LoopInfo>();
- RI = &getAnalysis<RegionInfo>();
+ RI = &getAnalysis<RegionInfoPass>().getRegionInfo();
if (!DetectScopsWithoutLoops && LI->empty())
return false;
@@ -873,7 +874,7 @@ void ScopDetection::getAnalysisUsage(Ana
AU.addRequired<ScalarEvolution>();
// We also need AA and RegionInfo when we are verifying analysis.
AU.addRequiredTransitive<AliasAnalysis>();
- AU.addRequiredTransitive<RegionInfo>();
+ AU.addRequiredTransitive<RegionInfoPass>();
AU.setPreservesAll();
}
@@ -902,7 +903,7 @@ INITIALIZE_AG_DEPENDENCY(AliasAnalysis);
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass);
INITIALIZE_PASS_DEPENDENCY(LoopInfo);
INITIALIZE_PASS_DEPENDENCY(PostDominatorTree);
-INITIALIZE_PASS_DEPENDENCY(RegionInfo);
+INITIALIZE_PASS_DEPENDENCY(RegionInfoPass);
INITIALIZE_PASS_DEPENDENCY(ScalarEvolution);
INITIALIZE_PASS_END(ScopDetection, "polly-detect",
"Polly - Detect static control parts (SCoPs)", false, false)
Modified: polly/trunk/lib/Analysis/ScopGraphPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopGraphPrinter.cpp?rev=213457&r1=213456&r2=213457&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopGraphPrinter.cpp (original)
+++ polly/trunk/lib/Analysis/ScopGraphPrinter.cpp Sat Jul 19 13:40:17 2014
@@ -91,7 +91,7 @@ struct DOTGraphTraits<ScopDetection *> :
std::string getNodeLabel(RegionNode *Node, ScopDetection *SD) {
return DOTGraphTraits<RegionNode *>::getNodeLabel(
- Node, SD->getRI()->getTopLevelRegion());
+ Node, reinterpret_cast<RegionNode *>(SD->getRI()->getTopLevelRegion()));
}
static std::string escapeString(std::string String) {
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=213457&r1=213456&r2=213457&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sat Jul 19 13:40:17 2014
@@ -1436,7 +1436,7 @@ ScopInfo::~ScopInfo() {
void ScopInfo::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
- AU.addRequired<RegionInfo>();
+ AU.addRequired<RegionInfoPass>();
AU.addRequired<ScalarEvolution>();
AU.addRequired<TempScopInfo>();
AU.setPreservesAll();
@@ -1472,7 +1472,7 @@ INITIALIZE_PASS_BEGIN(ScopInfo, "polly-s
"Polly - Create polyhedral description of Scops", false,
false);
INITIALIZE_PASS_DEPENDENCY(LoopInfo);
-INITIALIZE_PASS_DEPENDENCY(RegionInfo);
+INITIALIZE_PASS_DEPENDENCY(RegionInfoPass);
INITIALIZE_PASS_DEPENDENCY(ScalarEvolution);
INITIALIZE_PASS_DEPENDENCY(TempScopInfo);
INITIALIZE_PASS_END(ScopInfo, "polly-scops",
Modified: polly/trunk/lib/Analysis/TempScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/TempScopInfo.cpp?rev=213457&r1=213456&r2=213457&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/TempScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/TempScopInfo.cpp Sat Jul 19 13:40:17 2014
@@ -23,6 +23,7 @@
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
+#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/RegionIterator.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
@@ -395,7 +396,7 @@ INITIALIZE_AG_DEPENDENCY(AliasAnalysis);
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass);
INITIALIZE_PASS_DEPENDENCY(LoopInfo);
INITIALIZE_PASS_DEPENDENCY(PostDominatorTree);
-INITIALIZE_PASS_DEPENDENCY(RegionInfo);
+INITIALIZE_PASS_DEPENDENCY(RegionInfoPass);
INITIALIZE_PASS_DEPENDENCY(ScalarEvolution);
INITIALIZE_PASS_DEPENDENCY(DataLayoutPass);
INITIALIZE_PASS_END(TempScopInfo, "polly-analyze-ir",
Modified: polly/trunk/lib/CodeGen/CodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/CodeGeneration.cpp?rev=213457&r1=213456&r2=213457&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/CodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/CodeGeneration.cpp Sat Jul 19 13:40:17 2014
@@ -1051,7 +1051,7 @@ public:
AU.addRequired<CloogInfo>();
AU.addRequired<Dependences>();
AU.addRequired<DominatorTreeWrapperPass>();
- AU.addRequired<RegionInfo>();
+ AU.addRequired<RegionInfoPass>();
AU.addRequired<ScalarEvolution>();
AU.addRequired<ScopDetection>();
AU.addRequired<ScopInfo>();
@@ -1067,7 +1067,7 @@ public:
// FIXME: We do not yet add regions for the newly generated code to the
// region tree.
- AU.addPreserved<RegionInfo>();
+ AU.addPreserved<RegionInfoPass>();
AU.addPreserved<TempScopInfo>();
AU.addPreserved<ScopInfo>();
AU.addPreservedID(IndependentBlocksID);
@@ -1084,7 +1084,7 @@ INITIALIZE_PASS_BEGIN(CodeGeneration, "p
INITIALIZE_PASS_DEPENDENCY(CloogInfo);
INITIALIZE_PASS_DEPENDENCY(Dependences);
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass);
-INITIALIZE_PASS_DEPENDENCY(RegionInfo);
+INITIALIZE_PASS_DEPENDENCY(RegionInfoPass);
INITIALIZE_PASS_DEPENDENCY(ScalarEvolution);
INITIALIZE_PASS_DEPENDENCY(ScopDetection);
INITIALIZE_PASS_DEPENDENCY(DataLayoutPass);
Modified: polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslCodeGeneration.cpp?rev=213457&r1=213456&r2=213457&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/IslCodeGeneration.cpp Sat Jul 19 13:40:17 2014
@@ -31,6 +31,7 @@
#include "polly/Support/ScopHelper.h"
#include "polly/TempScopInfo.h"
#include "llvm/Analysis/LoopInfo.h"
+#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/ScalarEvolutionExpander.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/CommandLine.h"
@@ -1175,7 +1176,7 @@ public:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<DominatorTreeWrapperPass>();
AU.addRequired<IslAstInfo>();
- AU.addRequired<RegionInfo>();
+ AU.addRequired<RegionInfoPass>();
AU.addRequired<ScalarEvolution>();
AU.addRequired<ScopDetection>();
AU.addRequired<ScopInfo>();
@@ -1191,7 +1192,7 @@ public:
// FIXME: We do not yet add regions for the newly generated code to the
// region tree.
- AU.addPreserved<RegionInfo>();
+ AU.addPreserved<RegionInfoPass>();
AU.addPreserved<TempScopInfo>();
AU.addPreserved<ScopInfo>();
AU.addPreservedID(IndependentBlocksID);
@@ -1208,7 +1209,7 @@ INITIALIZE_PASS_BEGIN(IslCodeGeneration,
INITIALIZE_PASS_DEPENDENCY(Dependences);
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass);
INITIALIZE_PASS_DEPENDENCY(LoopInfo);
-INITIALIZE_PASS_DEPENDENCY(RegionInfo);
+INITIALIZE_PASS_DEPENDENCY(RegionInfoPass);
INITIALIZE_PASS_DEPENDENCY(ScalarEvolution);
INITIALIZE_PASS_DEPENDENCY(ScopDetection);
INITIALIZE_PASS_END(IslCodeGeneration, "polly-codegen-isl",
Modified: polly/trunk/lib/CodeGen/Utils.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/Utils.cpp?rev=213457&r1=213456&r2=213457&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/Utils.cpp (original)
+++ polly/trunk/lib/CodeGen/Utils.cpp Sat Jul 19 13:40:17 2014
@@ -26,7 +26,7 @@ BasicBlock *polly::executeScopConditiona
PollyIRBuilder Builder(R.getEntry());
DominatorTree &DT =
PassInfo->getAnalysis<DominatorTreeWrapperPass>().getDomTree();
- RegionInfo &RI = PassInfo->getAnalysis<RegionInfo>();
+ RegionInfo &RI = PassInfo->getAnalysis<RegionInfoPass>().getRegionInfo();
LoopInfo &LI = PassInfo->getAnalysis<LoopInfo>();
// Split the entry edge of the region and generate a new basic block on this
Modified: polly/trunk/lib/Support/ScopHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/ScopHelper.cpp?rev=213457&r1=213456&r2=213457&view=diff
==============================================================================
--- polly/trunk/lib/Support/ScopHelper.cpp (original)
+++ polly/trunk/lib/Support/ScopHelper.cpp Sat Jul 19 13:40:17 2014
@@ -121,6 +121,6 @@ void polly::splitEntryBlockForAlloca(Bas
// SplitBlock updates DT, DF and LI.
BasicBlock *NewEntry = SplitBlock(EntryBlock, I, P);
- if (RegionInfo *RI = P->getAnalysisIfAvailable<RegionInfo>())
- RI->splitBlock(NewEntry, EntryBlock);
+ if (RegionInfoPass *RIP = P->getAnalysisIfAvailable<RegionInfoPass>())
+ RIP->getRegionInfo().splitBlock(NewEntry, EntryBlock);
}
Modified: polly/trunk/lib/Transform/CodePreparation.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/CodePreparation.cpp?rev=213457&r1=213456&r2=213457&view=diff
==============================================================================
--- polly/trunk/lib/Transform/CodePreparation.cpp (original)
+++ polly/trunk/lib/Transform/CodePreparation.cpp Sat Jul 19 13:40:17 2014
@@ -40,6 +40,7 @@
#include "polly/LinkAllPasses.h"
#include "polly/CodeGen/BlockGenerators.h"
#include "polly/Support/ScopHelper.h"
+#include "llvm/Analysis/DominanceFrontier.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/RegionInfo.h"
#include "llvm/Analysis/ScalarEvolution.h"
@@ -215,7 +216,7 @@ void CodePreparation::getAnalysisUsage(A
AU.addRequired<ScalarEvolution>();
AU.addPreserved<LoopInfo>();
- AU.addPreserved<RegionInfo>();
+ AU.addPreserved<RegionInfoPass>();
AU.addPreserved<DominatorTreeWrapperPass>();
AU.addPreserved<DominanceFrontier>();
}
Modified: polly/trunk/lib/Transform/IndependentBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/IndependentBlocks.cpp?rev=213457&r1=213456&r2=213457&view=diff
==============================================================================
--- polly/trunk/lib/Transform/IndependentBlocks.cpp (original)
+++ polly/trunk/lib/Transform/IndependentBlocks.cpp Sat Jul 19 13:40:17 2014
@@ -17,7 +17,9 @@
#include "polly/CodeGen/Cloog.h"
#include "polly/ScopDetection.h"
#include "polly/Support/ScopHelper.h"
+#include "llvm/Analysis/DominanceFrontier.h"
#include "llvm/Analysis/LoopInfo.h"
+#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/RegionInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Transforms/Utils/Local.h"
@@ -494,8 +496,8 @@ void IndependentBlocks::getAnalysisUsage
AU.addPreserved<DominatorTreeWrapperPass>();
AU.addPreserved<DominanceFrontier>();
AU.addPreserved<PostDominatorTree>();
- AU.addRequired<RegionInfo>();
- AU.addPreserved<RegionInfo>();
+ AU.addRequired<RegionInfoPass>();
+ AU.addPreserved<RegionInfoPass>();
AU.addRequired<LoopInfo>();
AU.addPreserved<LoopInfo>();
AU.addRequired<ScalarEvolution>();
@@ -510,7 +512,7 @@ void IndependentBlocks::getAnalysisUsage
bool IndependentBlocks::runOnFunction(llvm::Function &F) {
bool Changed = false;
- RI = &getAnalysis<RegionInfo>();
+ RI = &getAnalysis<RegionInfoPass>().getRegionInfo();
LI = &getAnalysis<LoopInfo>();
SD = &getAnalysis<ScopDetection>();
SE = &getAnalysis<ScalarEvolution>();
@@ -557,7 +559,7 @@ Pass *polly::createIndependentBlocksPass
INITIALIZE_PASS_BEGIN(IndependentBlocks, "polly-independent",
"Polly - Create independent blocks", false, false);
INITIALIZE_PASS_DEPENDENCY(LoopInfo);
-INITIALIZE_PASS_DEPENDENCY(RegionInfo);
+INITIALIZE_PASS_DEPENDENCY(RegionInfoPass);
INITIALIZE_PASS_DEPENDENCY(ScalarEvolution);
INITIALIZE_PASS_DEPENDENCY(ScopDetection);
INITIALIZE_PASS_END(IndependentBlocks, "polly-independent",
More information about the llvm-commits
mailing list