[PATCH] [ARM] Align stack objects that may be memcpy'd

hfinkel at anl.gov hfinkel at anl.gov
Thu Feb 26 11:12:15 PST 2015


In http://reviews.llvm.org/D7908#130569, @hfinkel wrote:

> In http://reviews.llvm.org/D7908#130548, @john.brawn wrote:
>
> > Zero change in stack consumption in any EEMBC benchmark (I haven't checked SPEC). Also by CodeGen time we don't know if we're compiling -Os/-Oz as we just have CodeGenOpt::Level.
>
>
> No, the size optimization attribute is independent of CodeGenOpt::Level. You can get at it from CodeGen by querying:
>
>   MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize);


That having been said, code size and stack size, in this context, might be inversely related.

It might be better to implement this in CodeGenPrep. You could look directly for allocas that are used by memcpy intrinsics or as byval function argument parameters, and increase the alignment of only those directly.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7908

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list