llvm-6502/lib/CodeGen/SelectionDAG
Duncan Sands dc84650679 The guaranteed alignment of ptr+offset is only the minimum of
of offset and the alignment of ptr if these are both powers of
2.  While the ptr alignment is guaranteed to be a power of 2,
there is no reason to think that offset is.  For example, if
offset is 12 (the size of a long double on x86-32 linux) and
the alignment of ptr is 8, then the alignment of ptr+offset
will in general be 4, not 8.  Introduce a function MinAlign,
lifted from gcc, for computing the minimum guaranteed alignment.
I've tried to fix up everywhere under lib/CodeGen/SelectionDAG/.
I also changed some places that weren't wrong (because both values
were a power of 2), as a defensive change against people copying
and pasting the code.
Hopefully someone who cares about alignment will review the rest
of LLVM and fix up the remaining places.  Since I'm on x86 I'm
not very motivated to do this myself...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43421 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-28 12:59:45 +00:00
..
CallingConvLower.cpp propagate struct size and alignment of byval arguments to the DAG 2007-08-10 14:44:42 +00:00
DAGCombiner.cpp The guaranteed alignment of ptr+offset is only the minimum of 2007-10-28 12:59:45 +00:00
LegalizeDAG.cpp The guaranteed alignment of ptr+offset is only the minimum of 2007-10-28 12:59:45 +00:00
LegalizeDAGTypes.cpp The guaranteed alignment of ptr+offset is only the minimum of 2007-10-28 12:59:45 +00:00
Makefile For PR780: 2006-07-26 16:18:00 +00:00
ScheduleDAG.cpp EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like 2007-10-12 08:50:34 +00:00
ScheduleDAGList.cpp Make CalcLatency() non-recursive. 2007-10-15 21:33:22 +00:00
ScheduleDAGRRList.cpp One mundane change: Change ReplaceAllUsesOfValueWith to *optionally* 2007-10-15 06:10:22 +00:00
SelectionDAG.cpp If the value types are equal then this routine 2007-10-19 13:05:40 +00:00
SelectionDAGISel.cpp - Remove the hacky code that forces a memcpy. Alignment is taken care of in the 2007-10-26 20:24:42 +00:00
SelectionDAGPrinter.cpp Add a (disabled by default) way to view the ID of a node. 2007-10-15 05:32:43 +00:00
TargetLowering.cpp Add runtime library names for pow. 2007-10-11 23:09:10 +00:00