This is an archive of the discontinued LLVM Phabricator instance.

[Driver][doc] Document option -mtune as a no-op. NFC.
ClosedPublic

Authored by SjoerdMeijer on Apr 20 2020, 11:58 AM.

Details

Summary

This is a doc change documenting that option -mtune does not perform any CPU type specific tuning but exists for compatability reasons with GCC.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Apr 20 2020, 11:58 AM
Quuxplusone added inline comments.
clang/docs/ClangCommandLineReference.rst
2738

"Accepts any value, for compatibility with GCC. Does not perform any CPU-specific tuning."

In email I said:

there is no practical difference, but there may be a psychological difference, between saying "Clang permanently treats -mtune as a no-op" versus "Clang has a remarkably low quality of implementation for -mtune, and has no immediate plans to either improve or regress it."

To me, this patch's wording implies that Clang is promising to keep -mtune as a no-op forever. If Bob puts -mtune=supercalifragilistic in his Makefile today, and then in the future Clang starts emitting an "unknown target" error, will Bob point to this documentation as evidence that Clang promised to accept -mtune=supercalifragilistic as a no-op?

So I would rather say:

"Accepted for compatibility with GCC. Currently has no effect."

Cheers, that's probably what I wanted to say.

psmith accepted this revision.Apr 21 2020, 1:47 AM

That wording looks good to me. I've accepted the change, but worth waiting a day or so to see if there are any objections or suggestions.

This revision is now accepted and ready to land.Apr 21 2020, 1:47 AM

Thank you both for reviewing!
And I will wait a day.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2020, 1:36 AM