[PATCH] [ARM] Align global variables passed to memory intrinsics

hfinkel at anl.gov hfinkel at anl.gov
Fri Mar 20 10:28:09 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:1249
@@ -1248,1 +1248,3 @@
+      if ((Offset2 & (PrefAlign-1)) != 0)
+        continue;
       AllocaInst *AI;
----------------
If you add a continue here, then you might end up skipping some logic further down that would otherwise apply, no?


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:1257
@@ +1256,3 @@
+      // object (they have an initializer), and over-aligning global variables
+      // that have an explicit section is forbidden.
+      GlobalVariable *GV;
----------------
Why? Do the alignments need to match?

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:1260
@@ +1259,3 @@
+      if ((GV = dyn_cast<GlobalVariable>(Val)) &&
+          GV->hasInitializer() &&
+          !GV->hasSection() &&
----------------
Do you want this or hasUniqueInitializer() or hasDefinitiveInitializer()?

http://reviews.llvm.org/D8421

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






More information about the llvm-commits mailing list