forked from OSchip/llvm-project
Move TargetData to DataLayout to fix build breakage caused by LLVM r16540
llvm-svn: 165408
This commit is contained in:
parent
edb8656a3c
commit
7a3d8209c3
|
@ -23,7 +23,7 @@
|
|||
#include "llvm/Instructions.h"
|
||||
|
||||
namespace llvm {
|
||||
class TargetData;
|
||||
class DataLayout;
|
||||
}
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -228,7 +228,7 @@ class TempScopInfo : public FunctionPass {
|
|||
PostDominatorTree *PDT;
|
||||
|
||||
// Target data for element size computing.
|
||||
TargetData *TD;
|
||||
DataLayout *TD;
|
||||
|
||||
// Remember the bounds of loops, to help us build iteration domain of BBs.
|
||||
LoopBoundMapType LoopBounds;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/RegionIterator.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/DataLayout.h"
|
||||
#include "llvm/Assembly/Writer.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
|
@ -261,7 +261,7 @@ bool TempScopInfo::runOnFunction(Function &F) {
|
|||
LI = &getAnalysis<LoopInfo>();
|
||||
SD = &getAnalysis<ScopDetection>();
|
||||
AA = &getAnalysis<AliasAnalysis>();
|
||||
TD = &getAnalysis<TargetData>();
|
||||
TD = &getAnalysis<DataLayout>();
|
||||
|
||||
for (ScopDetection::iterator I = SD->begin(), E = SD->end(); I != E; ++I) {
|
||||
Region *R = const_cast<Region*>(*I);
|
||||
|
@ -272,7 +272,7 @@ bool TempScopInfo::runOnFunction(Function &F) {
|
|||
}
|
||||
|
||||
void TempScopInfo::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<TargetData>();
|
||||
AU.addRequired<DataLayout>();
|
||||
AU.addRequiredTransitive<DominatorTree>();
|
||||
AU.addRequiredTransitive<PostDominatorTree>();
|
||||
AU.addRequiredTransitive<LoopInfo>();
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "llvm/Analysis/ScalarEvolutionExpander.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/DataLayout.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
|
||||
#define CLOOG_INT_GMP 1
|
||||
|
@ -358,7 +358,7 @@ private:
|
|||
}
|
||||
|
||||
IntegerType *ClastStmtCodeGen::getIntPtrTy() {
|
||||
return P->getAnalysis<TargetData>().getIntPtrType(Builder.getContext());
|
||||
return P->getAnalysis<DataLayout>().getIntPtrType(Builder.getContext());
|
||||
}
|
||||
|
||||
const std::vector<std::string> &ClastStmtCodeGen::getParallelLoops() {
|
||||
|
@ -998,7 +998,7 @@ class CodeGeneration : public ScopPass {
|
|||
AU.addRequired<ScalarEvolution>();
|
||||
AU.addRequired<ScopDetection>();
|
||||
AU.addRequired<ScopInfo>();
|
||||
AU.addRequired<TargetData>();
|
||||
AU.addRequired<DataLayout>();
|
||||
|
||||
AU.addPreserved<CloogInfo>();
|
||||
AU.addPreserved<Dependences>();
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#define DEBUG_TYPE "polly-codegen-isl"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/DataLayout.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
|
||||
#include "isl/union_map.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Analysis/Dominators.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/DataLayout.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -179,7 +179,7 @@ void OMPGenerator::createCallLoopEndNowait() {
|
|||
}
|
||||
|
||||
IntegerType *OMPGenerator::getIntPtrTy() {
|
||||
return P->getAnalysis<TargetData>().getIntPtrType(Builder.getContext());
|
||||
return P->getAnalysis<DataLayout>().getIntPtrType(Builder.getContext());
|
||||
}
|
||||
|
||||
Module *OMPGenerator::getModule() {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/DataLayout.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
#include "llvm/Transforms/Utils/Cloning.h"
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include "llvm/Transforms/Utils/Local.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
#include "llvm/Transforms/Utils/SimplifyIndVar.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/DataLayout.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
|
@ -70,7 +70,7 @@ namespace {
|
|||
LoopInfo *LI;
|
||||
ScalarEvolution *SE;
|
||||
DominatorTree *DT;
|
||||
TargetData *TD;
|
||||
DataLayout *TD;
|
||||
|
||||
SmallVector<WeakVH, 16> DeadInsts;
|
||||
bool Changed;
|
||||
|
@ -732,13 +732,13 @@ namespace {
|
|||
|
||||
class WideIVVisitor : public IVVisitor {
|
||||
ScalarEvolution *SE;
|
||||
const TargetData *TD;
|
||||
const DataLayout *TD;
|
||||
|
||||
public:
|
||||
WideIVInfo WI;
|
||||
|
||||
WideIVVisitor(PHINode *NarrowIV, ScalarEvolution *SCEV,
|
||||
const TargetData *TData) :
|
||||
const DataLayout *TData) :
|
||||
SE(SCEV), TD(TData) { WI.NarrowIV = NarrowIV; }
|
||||
|
||||
// Implement the interface used by simplifyUsersOfIV.
|
||||
|
@ -1461,7 +1461,7 @@ static bool AlmostDeadIV(PHINode *Phi, BasicBlock *LatchBlock, Value *Cond) {
|
|||
/// could at least handle constant BECounts.
|
||||
static PHINode *
|
||||
FindLoopCounter(Loop *L, const SCEV *BECount,
|
||||
ScalarEvolution *SE, DominatorTree *DT, const TargetData *TD) {
|
||||
ScalarEvolution *SE, DominatorTree *DT, const DataLayout *TD) {
|
||||
uint64_t BCWidth = SE->getTypeSizeInBits(BECount->getType());
|
||||
|
||||
Value *Cond =
|
||||
|
@ -1808,7 +1808,7 @@ bool PollyIndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
|
|||
LI = &getAnalysis<LoopInfo>();
|
||||
SE = &getAnalysis<ScalarEvolution>();
|
||||
DT = &getAnalysis<DominatorTree>();
|
||||
TD = getAnalysisIfAvailable<TargetData>();
|
||||
TD = getAnalysisIfAvailable<DataLayout>();
|
||||
|
||||
DeadInsts.clear();
|
||||
Changed = false;
|
||||
|
|
Loading…
Reference in New Issue