[all-commits] [llvm/llvm-project] 4cbceb: [X86] Add basic support for -mtune command line op...

topperc via All-commits all-commits at lists.llvm.org
Tue Aug 18 15:13:56 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4cbceb74bb5676d0181d4d0cab5194d90a42c2ec
      https://github.com/llvm/llvm-project/commit/4cbceb74bb5676d0181d4d0cab5194d90a42c2ec
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-08-18 (Tue, 18 Aug 2020)

  Changed paths:
    M clang/include/clang/Basic/TargetOptions.h
    M clang/include/clang/Driver/Options.td
    M clang/lib/Basic/Targets.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/test/Misc/target-invalid-cpu-note.c

  Log Message:
  -----------
  [X86] Add basic support for -mtune command line option in clang

Building on the backend support from D85165. This parses the command line option in the driver, passes it on to CC1 and adds a function attribute.

-Still need to support tune on the target attribute.
-Need to use "generic" as the tuning by default. But need to change generic in the backend first.
-Need to set tune if march is specified and mtune isn't.
-May need to disable getHostCPUName's ability to guess CPU name from features when it doesn't have a family/model match for mtune=native. That's what gcc appears to do.

Differential Revision: https://reviews.llvm.org/D85384




More information about the All-commits mailing list