mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Move TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
#include "llvm/Intrinsics.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/DataLayout.h"
|
||||
#include "llvm/Target/TargetLowering.h"
|
||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
@@ -98,9 +98,9 @@ namespace {
|
||||
}
|
||||
|
||||
struct GlobalCmp {
|
||||
const TargetData *TD;
|
||||
const DataLayout *TD;
|
||||
|
||||
GlobalCmp(const TargetData *td) : TD(td) { }
|
||||
GlobalCmp(const DataLayout *td) : TD(td) { }
|
||||
|
||||
bool operator()(const GlobalVariable *GV1, const GlobalVariable *GV2) {
|
||||
Type *Ty1 = cast<PointerType>(GV1->getType())->getElementType();
|
||||
@@ -119,7 +119,7 @@ INITIALIZE_PASS(GlobalMerge, "global-merge",
|
||||
|
||||
bool GlobalMerge::doMerge(SmallVectorImpl<GlobalVariable*> &Globals,
|
||||
Module &M, bool isConst) const {
|
||||
const TargetData *TD = TLI->getTargetData();
|
||||
const DataLayout *TD = TLI->getDataLayout();
|
||||
|
||||
// FIXME: Infer the maximum possible offset depending on the actual users
|
||||
// (these max offsets are different for the users inside Thumb or ARM
|
||||
@@ -170,7 +170,7 @@ bool GlobalMerge::doMerge(SmallVectorImpl<GlobalVariable*> &Globals,
|
||||
|
||||
bool GlobalMerge::doInitialization(Module &M) {
|
||||
SmallVector<GlobalVariable*, 16> Globals, ConstGlobals, BSSGlobals;
|
||||
const TargetData *TD = TLI->getTargetData();
|
||||
const DataLayout *TD = TLI->getDataLayout();
|
||||
unsigned MaxOffset = TLI->getMaximalGlobalOffset();
|
||||
bool Changed = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user