[PATCH] D44848: Align stubs for external and common global variables to pointer size.

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 28 22:11:44 PDT 2018


espindola added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1340
       for (const auto &Stub : Stubs) {
+        EmitAlignment(Log2_32(DL.getPointerSize()));
         OutStreamer->EmitLabel(Stub.first);
----------------
Do you need to align in every loop iteration?


================
Comment at: test/Object/X86/align-stub.ll:2
+; RUN: llc %s -mtriple=x86_64-unknown-unknown -relocation-model=pic \
+; RUN:   -filetype=obj -o - | llvm-objdump -r - | FileCheck %s
+
----------------
Please don't use -filetype=obj. You can check for the align  directive in the assembly.


Repository:
  rL LLVM

https://reviews.llvm.org/D44848





More information about the llvm-commits mailing list