[PATCH] [ARM] Align stack objects passed to functions

John Brawn john.brawn at arm.com
Fri Mar 6 10:19:32 PST 2015


I may be reworking this patch to align not just allocas, but also global variables defined in this translation unit. The ultimate thing I'm trying to optimize is cases like

  void fn() {
    char arr[31];
    strcpy(arr, "some string");
    // do somthing with arr
  }

This patch aligns arr, but the variable generated for the string needs to be aligned as well. The plan was to do that in clang, but I'm thinking that maybe doing it here would be better.

Or maybe it would be better to get this checked in then do that, but the name shouldAlignAllocaArgs would have to be changed (maybe shouldAlignPointerArgs).


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