Fix compilation after 'Make DataLayout Non-Optional in the Module' commit

llvm-svn: 231362
This commit is contained in:
Tobias Grosser
2015-03-05 09:48:20 +00:00
parent 5c4ce05d6a
commit 140b394e10
3 changed files with 6 additions and 8 deletions

View File

@@ -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(Function &F) {
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(Function &F) {
}
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(LoopInfoWrapperPass);
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)

View File

@@ -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>();

View File

@@ -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 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, "polly-import-jscop",
" (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)",