[llvm-commits] PATCH: Use modules data layout over subtarget data layout, if it exists.

Chris Lattner clattner at apple.com
Wed Feb 18 14:18:03 PST 2009


On Feb 18, 2009, at 2:13 PM, Burke, Max wrote:

> 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.

Hi Max,

What are you trying to accomplish here?  Changing the target data  
layout arbitrarily can cause serious problems.  Also, please send  
patches as an attachment.

-Chris

>
>
>
>
> ==== //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()),
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list