[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
Thu Aug 27 00:44:24 PDT 2020


craig.topper added a comment.

In D86488#2241176 <https://reviews.llvm.org/D86488#2241176>, @nikic wrote:

> This change has a 0.3% compile-time regression (https://llvm-compile-time-tracker.com/compare.php?from=0c55889d809027136048a0d144209a2bc282e7fc&to=71f3169e1baeff262583b35ef88f8fb6df7be85e&stat=instructions) and a 0.3% max-rss regression (https://llvm-compile-time-tracker.com/compare.php?from=0c55889d809027136048a0d144209a2bc282e7fc&to=71f3169e1baeff262583b35ef88f8fb6df7be85e&stat=max-rss).
>
> Is that expected? The diff looks pretty harmless to me.

No it wasnt expected. There was already a comment on the commit about it. The settings it’s selecting should match the default we get with no -march on Linux. The only thing I’ve found so far is extra time to read the function attribute from getSubtargetImpl which happen every time getTTI is called. And extra time to add the function attribute in clang. The strange thing is it seems to have regressed O0 even so that rules out a lot of optimization related code. Any information you can provide would be helpful.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86488/new/

https://reviews.llvm.org/D86488



More information about the cfe-commits mailing list