[all-commits] [llvm/llvm-project] 71f316: [X86] Default to -mtune=generic unless -march is p...

topperc via All-commits all-commits at lists.llvm.org
Wed Aug 26 14:54:23 PDT 2020


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

  Changed paths:
    M clang/lib/Basic/Targets/X86.h
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Frontend/FrontendActions.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/test/Driver/x86-mtune.c
    M clang/test/Modules/module_file_info.m

  Log Message:
  -----------
  [X86] Default to -mtune=generic unless -march is passed to the driver. Add TuneCPU to the AST serialization

This patch defaults to -mtune=generic unless -march is present. If -march is present we'll use the empty string unless its overridden by mtune. The back should use the target cpu if the tune-cpu isn't present.

It also adds AST serialization support to fix some tests that emit AST and parse it back. These tests diff the IR against the output from not going through AST. So if we don't serialize the tune CPU we fail the diff.

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




More information about the All-commits mailing list