Page MenuHomePhabricator

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

Authored by craig.topper on Fri, Aug 28, 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.Fri, Aug 28, 3:11 PM
craig.topper requested review of this revision.Fri, Aug 28, 3:11 PM
hans added a comment.Mon, Aug 31, 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.Tue, Sep 1, 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.Wed, Sep 2, 2:21 AM

lgtm

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