New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -fno-verbose-asm to clang #6462
base: main
Are you sure you want to change the base?
Conversation
This is maybe an Ok change, but calling in @OfekShilon and @mattgodbolt It might be appropriate to only hide these when comments are filtered out, but not sure |
Great find! I wasn't aware of this switch. I looked in the llvm source and indeed it controls only comments, but I'm not sure all are useless. One random example (first in the list): https://github.com/llvm/llvm-project/blob/31774b6a8a88b435ce79f9ba048ef8bb00e2817e/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp#L96-L110 bool VerboseAsm = Asm->OutStreamer->isVerboseAsm();
int Entry = 0;
// Emit the Catch TypeInfos.
if (VerboseAsm && !TypeInfos.empty()) {
Asm->OutStreamer->AddComment(">> Catch TypeInfos <<");
Asm->OutStreamer->addBlankLine();
Entry = TypeInfos.size();
}
for (const GlobalValue *GV : reverse(TypeInfos)) {
if (VerboseAsm)
Asm->OutStreamer->AddComment("TypeInfo " + Twine(Entry--));
Asm->emitTTypeReference(GV, TTypeEncoding);
} Can certainly be useful to anyone debugging ARM exceptions. So I'd say this switch would be activated only when the comments-filter is checked, but that might require a server roundtrip where (I think?) today it isn't required. Do you think that's doable? |
Yeah doing it when comments are filtered out? I dunno. We've had folks asking before for I think I'm ok to merge this, but
|
That sounds like a winner, Ofek; and if we do it right fixes a number of those linked issues too! |
Actually I take it back - after looking at the old issues I think it would be best to indeed link |
This removes useless comments (namely repeated function/label names,
<n>-byte Folded Spill
and others) from the generated assembly.Fixes #5964