[PATCH] [ARM] Align global variables passed to memory intrinsics
John Brawn
john.brawn at arm.com
Fri Mar 27 03:30:37 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:1261
@@ +1260,3 @@
+ GV->hasInitializer() &&
+ !GV->hasSection() &&
+ GV->getAlignment() < PrefAlign &&
----------------
rengolin wrote:
> Why is this necessary?
As I said to Hal previously, http://llvm.org/docs/LangRef.html#global-variables says:
Targets and optimizers are not allowed to over-align the global if the global has an assigned section. In this case, the extra alignment could be observable: for example, code could assume that the globals are densely packed in their section and try to iterate over them as an array, alignment padding would break this iteration.
http://reviews.llvm.org/D8421
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list