On Mar 2, 2012, at 3:57 AM, Jay Foad wrote: > http://llvm.org/bugs/show_bug.cgi?id=12094 > > The attached patch: > > - Makes CGBuiltin.cpp's helper function GetPointeeAlignment into a > proper member of CodeGenFunction and splits it into two: > -- GetPointeeAlignment, which returns alignment as an unsigned, and > -- GetPointeeAlignmentValue, which wraps the result in an llvm::Value > for the convenience of generating ARM NEON intrinsics.
Looks great to me, please commit Jay. Thanks for tackling this! -Chris > > - Uses GetPointeeAlignment to set a sensible alignment on all memory > intrinsics (memcpy, memset etc.) instead of the conservative default > of 1. > > Tested with "make check-all". Unfortunately I can only test on x86_64, > where alignment doesn't make much difference. Can anyone test it on > what GCC would call a STRICT_ALIGNMENT target for me? > > I also tried compiling sqlite3.c (from test-suite) with clang -O2, > before and after my changes. The only differences were a handful of > calls to memcpy replaced with "rep;movsq", which seems good. > > Thanks, > Jay. > <getpointeealignment.diff>_______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
