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

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 19:58:07 PST 2021


reames added a comment.

I'm not convinced that disabling these optimizations is warranted.  I'm not actively opposing the patch, just want to list my concerns for the record.

As a general matter, -O3 -g means "perform optimization while preserving the best debug experience we can", not "strictly w/o reducing debug quality optimize as best as possible".  We have numerous places in the optimizer that we perform optimizations that destroy debug information.  We also have lots of places - one use restrictions which haven't been audited for instance - where the presence of debug info restricts optimization.  We treat the later as bugs, not the former.

It's not clear to be me why this particular optimization should be disabled just because it happens to emit different code w/ and w/o debuging enabled.

The bug (https://bugs.llvm.org/show_bug.cgi?id=42138) that triggered this review appears to be an automated testing framework.  I fully understand the value of that type of automatic bug discovery, but when the framework reports something which is not a bug, the framework should be fixed.  I believe this is a bug in the reporting framework, not the assembler.


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