[llvm-commits] PATCH: Use modules data layout over subtarget data layout, if it exists.
Burke, Max
mburke at ea.com
Wed Feb 18 14:13:20 PST 2009
I was finding that setting the data layout in the IR didn't actually
propagate to the target back ends which was a little confusing :). If
the modules data layout isn't specified then it uses the subtarget data
layout.
==== //depot/llvm/lib/Target/CellSPU/SPUTargetMachine.cpp#5 (text) ====
68c68,69
< DataLayout(Subtarget.getTargetDataString()),
---
> DataLayout(!M.getDataLayout().empty() ? M.getDataLayout() :
> Subtarget.getTargetDataString()),
==== //depot/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp#6 (text) ====
104c104,106
< DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this),
---
> DataLayout(!M.getDataLayout().empty() ?
> M.getDataLayout() : Subtarget.getTargetDataString()),
> InstrInfo(*this),
==== //depot/llvm/lib/Target/X86/X86TargetMachine.cpp#5 (text) ====
133c133,134
< DataLayout(Subtarget.getDataLayout()),
---
> DataLayout(!M.getDataLayout().empty() ?
> M.getDataLayout() : Subtarget.getDataLayout()),
More information about the llvm-commits
mailing list