[llvm] r230059 - Grab the DataLayout off of the TargetMachine since that's where
Eric Christopher
echristo at gmail.com
Fri Feb 20 12:56:39 PST 2015
Author: echristo
Date: Fri Feb 20 14:56:39 2015
New Revision: 230059
URL: http://llvm.org/viewvc/llvm-project?rev=230059&view=rev
Log:
Grab the DataLayout off of the TargetMachine since that's where
it's stored.
Modified:
llvm/trunk/lib/CodeGen/GlobalMerge.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalMerge.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalMerge.cpp?rev=230059&r1=230058&r2=230059&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalMerge.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalMerge.cpp Fri Feb 20 14:56:39 2015
@@ -144,7 +144,7 @@ INITIALIZE_TM_PASS(GlobalMerge, "global-
bool GlobalMerge::doMerge(SmallVectorImpl<GlobalVariable*> &Globals,
Module &M, bool isConst, unsigned AddrSpace) const {
const TargetLowering *TLI = TM->getSubtargetImpl()->getTargetLowering();
- const DataLayout *DL = TLI->getDataLayout();
+ const DataLayout *DL = TM->getDataLayout();
// FIXME: Infer the maximum possible offset depending on the actual users
// (these max offsets are different for the users inside Thumb or ARM
@@ -283,7 +283,7 @@ bool GlobalMerge::doInitialization(Modul
DenseMap<unsigned, SmallVector<GlobalVariable*, 16> > Globals, ConstGlobals,
BSSGlobals;
const TargetLowering *TLI = TM->getSubtargetImpl()->getTargetLowering();
- const DataLayout *DL = TLI->getDataLayout();
+ const DataLayout *DL = TM->getDataLayout();
unsigned MaxOffset = TLI->getMaximalGlobalOffset();
bool Changed = false;
setMustKeepGlobalVariables(M);
More information about the llvm-commits
mailing list