[polly] r231362 - Fix compilation after 'Make DataLayout Non-Optional in the Module' commit
Tobias Grosser
tobias at grosser.es
Thu Mar 5 01:48:21 PST 2015
Author: grosser
Date: Thu Mar 5 03:48:20 2015
New Revision: 231362
URL: http://llvm.org/viewvc/llvm-project?rev=231362&view=rev
Log:
Fix compilation after 'Make DataLayout Non-Optional in the Module' commit
Modified:
polly/trunk/lib/Analysis/TempScopInfo.cpp
polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
polly/trunk/lib/Exchange/JSONExporter.cpp
Modified: polly/trunk/lib/Analysis/TempScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/TempScopInfo.cpp?rev=231362&r1=231361&r2=231362&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/TempScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/TempScopInfo.cpp Thu Mar 5 03:48:20 2015
@@ -28,6 +28,7 @@
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/IR/DataLayout.h"
+#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
using namespace llvm;
@@ -442,7 +443,7 @@ bool TempScopInfo::runOnFunction(Functio
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
SD = &getAnalysis<ScopDetection>();
AA = &getAnalysis<AliasAnalysis>();
- TD = &getAnalysis<DataLayoutPass>().getDataLayout();
+ TD = &F.getParent()->getDataLayout();
ZeroOffset = SE->getConstant(TD->getIntPtrType(F.getContext()), 0);
for (ScopDetection::iterator I = SD->begin(), E = SD->end(); I != E; ++I) {
@@ -456,7 +457,6 @@ bool TempScopInfo::runOnFunction(Functio
}
void TempScopInfo::getAnalysisUsage(AnalysisUsage &AU) const {
- AU.addRequired<DataLayoutPass>();
AU.addRequiredTransitive<DominatorTreeWrapperPass>();
AU.addRequiredTransitive<PostDominatorTree>();
AU.addRequiredTransitive<LoopInfoWrapperPass>();
@@ -491,7 +491,6 @@ INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapp
INITIALIZE_PASS_DEPENDENCY(PostDominatorTree);
INITIALIZE_PASS_DEPENDENCY(RegionInfoPass);
INITIALIZE_PASS_DEPENDENCY(ScalarEvolution);
-INITIALIZE_PASS_DEPENDENCY(DataLayoutPass);
INITIALIZE_PASS_END(TempScopInfo, "polly-analyze-ir",
"Polly - Analyse the LLVM-IR in the detected regions",
false, false)
Modified: polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslCodeGeneration.cpp?rev=231362&r1=231361&r2=231362&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/IslCodeGeneration.cpp Thu Mar 5 03:48:20 2015
@@ -964,7 +964,7 @@ public:
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
SE = &getAnalysis<ScalarEvolution>();
- DL = &getAnalysis<DataLayoutPass>().getDataLayout();
+ DL = &S.getRegion().getEntry()->getParent()->getParent()->getDataLayout();
assert(!S.getRegion().isTopLevelRegion() &&
"Top level regions are not supported");
@@ -993,7 +993,6 @@ public:
void printScop(raw_ostream &, Scop &) const override {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.addRequired<DataLayoutPass>();
AU.addRequired<DominatorTreeWrapperPass>();
AU.addRequired<IslAstInfo>();
AU.addRequired<RegionInfoPass>();
Modified: polly/trunk/lib/Exchange/JSONExporter.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Exchange/JSONExporter.cpp?rev=231362&r1=231361&r2=231362&view=diff
==============================================================================
--- polly/trunk/lib/Exchange/JSONExporter.cpp (original)
+++ polly/trunk/lib/Exchange/JSONExporter.cpp Thu Mar 5 03:48:20 2015
@@ -19,6 +19,7 @@
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/RegionInfo.h"
+#include "llvm/IR/Module.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/ToolOutputFile.h"
@@ -183,7 +184,8 @@ typedef Dependences::StatementToIslMapTy
bool JSONImporter::runOnScop(Scop &S) {
Region &R = S.getRegion();
const Dependences &D = getAnalysis<DependenceInfo>().getDependences();
- const DataLayout &DL = getAnalysis<DataLayoutPass>().getDataLayout();
+ const DataLayout &DL =
+ S.getRegion().getEntry()->getParent()->getParent()->getDataLayout();
std::string FileName = ImportDir + "/" + getFileName(S);
@@ -356,7 +358,6 @@ bool JSONImporter::runOnScop(Scop &S) {
void JSONImporter::getAnalysisUsage(AnalysisUsage &AU) const {
ScopPass::getAnalysisUsage(AU);
AU.addRequired<DependenceInfo>();
- AU.addRequired<DataLayoutPass>();
}
Pass *polly::createJSONImporterPass() { return new JSONImporter(); }
@@ -375,7 +376,6 @@ INITIALIZE_PASS_BEGIN(JSONImporter, "pol
" (Reads a .jscop file for each Scop)",
false, false);
INITIALIZE_PASS_DEPENDENCY(DependenceInfo)
-INITIALIZE_PASS_DEPENDENCY(DataLayoutPass)
INITIALIZE_PASS_END(JSONImporter, "polly-import-jscop",
"Polly - Import Scops from JSON"
" (Reads a .jscop file for each Scop)",
More information about the llvm-commits
mailing list