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

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 14:25:08 PDT 2020


craig.topper created this revision.
craig.topper added reviewers: spatel, erichkeane, RKSimon, echristo, efriedma.
craig.topper requested review of this revision.

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.


https://reviews.llvm.org/D86488

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86488.287494.patch
Type: text/x-patch
Size: 6280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200824/05a6b110/attachment.bin>


More information about the cfe-commits mailing list