[PATCH] [ARM] Align stack objects passed to functions
John Brawn
john.brawn at arm.com
Fri Mar 6 07:58:46 PST 2015
REPOSITORY
rL LLVM
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:1236
@@ +1235,3 @@
+ unsigned AllocaSize = 0, AllocaAlign = 0;
+ if (TLI && TD && TLI->shouldAlignAllocaArgs(CI, AllocaSize, AllocaAlign)) {
+ assert(AllocaAlign != 0 && "shouldAlignAllocaArgs must set AllocaAlign");
----------------
rengolin wrote:
> I'm a bit averse of setting parameters for the computation inside a conditional and having to assert right after every call. I'd rather have (or reuse) some default size/alignment parameters from elsewhere.
If an implementation of shouldAlignAllocaArgs were to not set AllocaAlign then that indicates that it's not doing what it should, so failing an assert is better than hiding that by silently using a default value.
http://reviews.llvm.org/D7908
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list