Update for RegionInfo changes.
Mostly related to missing includes and renaming of the pass to RegionInfoPass. llvm-svn: 213457
This commit is contained in:
parent
1b8d83796d
commit
8ca36815ee
|
@ -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::emitMissedRemarksForLeaves(const Function &F,
|
|||
|
||||
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(AnalysisUsage &AU) const {
|
|||
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)
|
||||
|
|
|
@ -91,7 +91,7 @@ struct DOTGraphTraits<ScopDetection *> : public DOTGraphTraits<RegionNode *> {
|
|||
|
||||
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) {
|
||||
|
|
|
@ -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-scops",
|
|||
"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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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, "polly-codegen",
|
|||
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);
|
||||
|
|
|
@ -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, "polly-codegen-isl",
|
|||
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",
|
||||
|
|
|
@ -26,7 +26,7 @@ BasicBlock *polly::executeScopConditionally(Scop &S, Pass *PassInfo) {
|
|||
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
|
||||
|
|
|
@ -121,6 +121,6 @@ void polly::splitEntryBlockForAlloca(BasicBlock *EntryBlock, Pass *P) {
|
|||
|
||||
// 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);
|
||||
}
|
||||
|
|
|
@ -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(AnalysisUsage &AU) const {
|
|||
AU.addRequired<ScalarEvolution>();
|
||||
|
||||
AU.addPreserved<LoopInfo>();
|
||||
AU.addPreserved<RegionInfo>();
|
||||
AU.addPreserved<RegionInfoPass>();
|
||||
AU.addPreserved<DominatorTreeWrapperPass>();
|
||||
AU.addPreserved<DominanceFrontier>();
|
||||
}
|
||||
|
|
|
@ -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(AnalysisUsage &AU) const {
|
|||
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(AnalysisUsage &AU) const {
|
|||
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() { return new IndependentBlocks(); }
|
|||
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",
|
||||
|
|
Loading…
Reference in New Issue