[PATCH] D158046: [X86] Support -march=gracemont

Simon Pilgrim via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 17 08:28:20 PDT 2023


RKSimon added inline comments.


================
Comment at: clang/lib/Basic/Targets/X86.cpp:551
   case CK_Lunarlake:
+  case CK_Gracemont:
   case CK_Sierraforest:
----------------
FreddyYe wrote:
> RKSimon wrote:
> > Why not handle this above (below tremont) as the next in the *mont series?
> Good catch. This isn't a short story... In short words, it was to save codes in predefined-arch-macros.c.
> If set gracemont as a series of atom processors, macros like `corei7`(predefined-arch-macros.c:2061-2062) won't be generated by `-march=gracemont`, and for history reasons, atom series processors defined some extra macros of their names, like "tremont", "goldmont", ... but these macros are not used any longer IIRC. So I decided to define gracemont as a non-atom series one.
Hmm - how about we move it after Tremont and then add a comment explaining that going forward atom/e-cores will share p-core defines? 
```
case CK_Tremont:
    defineCPUMacros(Builder, "tremont");
    break;
case CK_Gracemont:
  // Gracemont and later atom-cores use p-core cpu macros.
  [[fallthrough]];
case CK_Nehalem:
 ...
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158046



More information about the cfe-commits mailing list