[llvm-commits] [llvm] r74624 - in /llvm/trunk: include/llvm/CodeGen/ include/llvm/Target/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/CellSPU/ lib/Target/IA64/ lib/Target/MSP430/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/

Chris Lattner clattner at apple.com
Wed Jul 1 20:18:42 PDT 2009


On Jul 1, 2009, at 6:40 PM, Daniel Dunbar wrote:

> I probably missed the backstory here, but wouldn't it be better for us
> to consistently use byte alignment?
>
> Some contexts will always need non-power of two alignment, and I think
> there is value in standardizing on one form. The situation now is we
> have code like TargetData::get...Alignment which returns bytes, and
> MachineFunction::get...Alignment which returns log2. Alternately we
> could include Log2 in the name...

I vote for keeping it in log2 and standardizing on log2 form.  The  
reason is that it takes less space to represent, it is impossible to  
store something that is not a pow2, and it is cheaper to convert from  
log2 -> bytes than from bytes->log2.

-Chris




More information about the llvm-commits mailing list