[llvm-commits] [llvm] r119916 - in /llvm/trunk: include/llvm/Support/CallSite.h lib/Transforms/Scalar/MemCpyOptimizer.cpp test/Transforms/MemCpyOpt/memcpy.ll test/Transforms/MemCpyOpt/sret.ll

Chris Lattner clattner at apple.com
Sun Nov 21 11:07:17 PST 2010


On Nov 21, 2010, at 3:25 AM, Duncan Sands wrote:

> Hi Chris,
> 
>> Unfortunately, the requirements on byval's without explicit
>> alignment are really weak and impossible to predict in the
>> mid-level optimizer, so this doesn't kick in much with current
>> frontends.  The fix is to change clang to set alignment on all
>> byval arguments.
> 
> so a byval without an explicit alignment doesn't use the ABI alignment
> for the type?

Right, it is insane, but the alignment is determined by a target hook like X86ISelLowering::getByValTypeAlignment.  I don't know if this matters any more in practice, it would be great to rip this out.

> 
>> +  // The length of the memcpy must be larger or equal to the size of the byval.
>> +  // must be larger than the following one.
> 
> The second comment line has a problem.

Will fix, thanks!

-Chris



More information about the llvm-commits mailing list