[PATCH] [ARM] Align global variables passed to memory intrinsics
Renato Golin
renato.golin at linaro.org
Fri Mar 27 02:40:49 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:1249
@@ -1248,1 +1248,3 @@
+ if ((Offset2 & (PrefAlign-1)) != 0)
+ continue;
AllocaInst *AI;
----------------
john.brawn wrote:
> hfinkel wrote:
> > If you add a continue here, then you might end up skipping some logic further down that would otherwise apply, no?
> >
> That's what we want: this is the 'offset must be a multiple of the alignment' check, and if it's not true we don't want to align for both allocas and global variables.
I agree, this is a continue on the local block, only, and it has the same semantics as previously.
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:1261
@@ +1260,3 @@
+ GV->hasInitializer() &&
+ !GV->hasSection() &&
+ GV->getAlignment() < PrefAlign &&
----------------
Why is this necessary?
http://reviews.llvm.org/D8421
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list