This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add a /tune: option for clang-cl
ClosedPublic

Authored by craig.topper on Aug 28 2020, 3:11 PM.

Details

Summary

We recently added support for -mtune. This patch adds /tune: so we can specify the tune CPU from clang-cl. MSVC doesn't support this but icc does.

Diff Detail

Event Timeline

craig.topper created this revision.Aug 28 2020, 3:11 PM
craig.topper requested review of this revision.Aug 28 2020, 3:11 PM
hans added a comment.Aug 31 2020, 5:47 AM

Would it be enough for users to specify /clang:-mtune instead? How does icc spell its option?

Would it be enough for users to specify /clang:-mtune instead? How does icc spell its option?

I didn't know you could spell it as /clang:-mtune. ICC has /tune: according to this documentation https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/compiler-options/compiler-option-details/code-generation-options/mtune-tune.html

hans added a comment.Sep 1 2020, 4:38 AM

Okay, adding it to clang-cl seems fine to me. But I think it could be a simple alias?

clang/include/clang/Driver/Options.td
4707

Any reason this can't just be an alias?

Use an alias.

hans accepted this revision.Sep 2 2020, 2:21 AM

lgtm

This revision is now accepted and ready to land.Sep 2 2020, 2:21 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2020, 8:28 PM