[PATCH] D94542: [X86] Default to -x86-pad-for-align=false to drop assembler difference with or w/o -g

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 15:05:26 PST 2021


jyknight added a comment.

> This doesn't get at the root cause though. Are those labels doing anything in the debug build? Why are they emitted? Can they be reasonably removed?

The debug sections refer to offsets in the code, and thus need labels. They can't be removed.

But (as per my comment on the old review), the optimization COULD have code added to allow those debug labels to be moved, thus allowing padding of instructions not to stop at such a label, thus fixing the codegen difference with -g. It just doesn't look trivial to figure out when that should be allowed, though.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94542/new/

https://reviews.llvm.org/D94542



More information about the llvm-commits mailing list