Message ID | 17d1869e788e1f364d3a3303cde5a553c41a4fa1.1709722620.git.efraim@flashner.co.il |
---|---|
State | New |
Headers | show |
Series | CPU tuning patches | expand |
Efraim Flashner <efraim@flashner.co.il> skribis: > * gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for > versions 17, 16, 15, 13, 9 and remove entry for version 10. > > Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd [...] > - ;; This list was obtained by running: > - ;; > - ;; guix shell clang -- llc -march=x86-64 -mattr=help > - ;; > - ;; filtered from uninteresting entries such as "i686" and "pentium". [...] > + ("x86_64" > + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c Does the ‘llc’ method no longer work? It looked easier. Apart from that, LGTM. Ludo’.
On Wed, Mar 06, 2024 at 07:12:25PM +0100, Ludovic Courtès wrote: > Efraim Flashner <efraim@flashner.co.il> skribis: > > > * gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for > > versions 17, 16, 15, 13, 9 and remove entry for version 10. > > > > Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd > > [...] > > > - ;; This list was obtained by running: > > - ;; > > - ;; guix shell clang -- llc -march=x86-64 -mattr=help > > - ;; > > - ;; filtered from uninteresting entries such as "i686" and "pentium". > > [...] > > > + ("x86_64" > > + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c > > Does the ‘llc’ method no longer work? It looked easier. > > Apart from that, LGTM. I've attached the file from llvmorg-15.0.7. I found the file easier since I didn't have to run the command from the shell and it listed all the architectures I wouldn't have even thought of looking at. And I didn't have to do any filtering myself. And it's sorted by "power" and by vendor, not alphabetically.
On Wed, Mar 06, 2024 at 07:12:25PM +0100, Ludovic Courtès wrote: > Efraim Flashner <efraim@flashner.co.il> skribis: > > > * gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for > > versions 17, 16, 15, 13, 9 and remove entry for version 10. > > > > Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd > > [...] > > > - ;; This list was obtained by running: > > - ;; > > - ;; guix shell clang -- llc -march=x86-64 -mattr=help > > - ;; > > - ;; filtered from uninteresting entries such as "i686" and "pentium". > > [...] > > > + ("x86_64" > > + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c > > Does the ‘llc’ method no longer work? It looked easier. > > Apart from that, LGTM. Forgot to attach the file.
Efraim Flashner <efraim@flashner.co.il> skribis: > On Wed, Mar 06, 2024 at 07:12:25PM +0100, Ludovic Courtès wrote: >> Efraim Flashner <efraim@flashner.co.il> skribis: >> >> > * gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for >> > versions 17, 16, 15, 13, 9 and remove entry for version 10. >> > >> > Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd >> >> [...] >> >> > - ;; This list was obtained by running: >> > - ;; >> > - ;; guix shell clang -- llc -march=x86-64 -mattr=help >> > - ;; >> > - ;; filtered from uninteresting entries such as "i686" and "pentium". >> >> [...] >> >> > + ("x86_64" >> > + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c >> >> Does the ‘llc’ method no longer work? It looked easier. >> >> Apart from that, LGTM. > > I've attached the file from llvmorg-15.0.7. I found the file easier > since I didn't have to run the command from the shell and it listed all > the architectures I wouldn't have even thought of looking at. And I > didn't have to do any filtering myself. And it's sorted by "power" and > by vendor, not alphabetically. I see. It looks convenient but that’s a unit test: it’s not the “ground truth” and it doesn’t have to match exactly what’s supported. The ‘llc’ command is likely more faithful so I would keep it at least in the comment. Ludo’.
On Thu, Mar 07, 2024 at 10:42:09PM +0100, Ludovic Courtès wrote: > Efraim Flashner <efraim@flashner.co.il> skribis: > > > On Wed, Mar 06, 2024 at 07:12:25PM +0100, Ludovic Courtès wrote: > >> Efraim Flashner <efraim@flashner.co.il> skribis: > >> > >> > * gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for > >> > versions 17, 16, 15, 13, 9 and remove entry for version 10. > >> > > >> > Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd > >> > >> [...] > >> > >> > - ;; This list was obtained by running: > >> > - ;; > >> > - ;; guix shell clang -- llc -march=x86-64 -mattr=help > >> > - ;; > >> > - ;; filtered from uninteresting entries such as "i686" and "pentium". > >> > >> [...] > >> > >> > + ("x86_64" > >> > + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c > >> > >> Does the ‘llc’ method no longer work? It looked easier. > >> > >> Apart from that, LGTM. > > > > I've attached the file from llvmorg-15.0.7. I found the file easier > > since I didn't have to run the command from the shell and it listed all > > the architectures I wouldn't have even thought of looking at. And I > > didn't have to do any filtering myself. And it's sorted by "power" and > > by vendor, not alphabetically. > > I see. It looks convenient but that’s a unit test: it’s not the “ground > truth” and it doesn’t have to match exactly what’s supported. The ‘llc’ > command is likely more faithful so I would keep it at least in the > comment. I'll keep the original comment and compare what I've added to what's returned from the command. Then we also have an easy list to compare against when removing uninteresting options from the output.
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 2778d0ec38..2567405cb4 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -482,67 +482,67 @@ (define* (clang-from-llvm llvm clang-runtime (define (clang-properties version) "Return package properties for Clang VERSION." `((compiler-cpu-architectures - ("x86_64" - ;; This list was obtained by running: - ;; - ;; guix shell clang -- llc -march=x86-64 -mattr=help - ;; - ;; filtered from uninteresting entries such as "i686" and "pentium". - ,@(if (version>=? version "10.0") ;TODO: refine - '("atom" - "barcelona" - "bdver1" - "bdver2" - "bdver3" - "bdver4" - "bonnell" - "broadwell" - "btver1" - "btver2" - "c3" - "c3-2" - "cannonlake" - "cascadelake" - "cooperlake" - "core-avx-i" - "core-avx2" - "core2" - "corei7" - "corei7-avx" - "generic" - "geode" - "goldmont" - "goldmont-plus" - "haswell" - "icelake-client" - "icelake-server" - "ivybridge" - "k8" - "k8-sse3" - "knl" - "knm" - "lakemont" - "nehalem" - "nocona" - "opteron" - "opteron-sse3" - "sandybridge" - "silvermont" - "skx" - "skylake" - "skylake-avx512" - "slm" - "tigerlake" - "tremont" - "westmere" - "x86-64" - "x86-64-v2" - "x86-64-v3" - "x86-64-v4" - "znver1" - "znver2" - "znver3") - '()))))) + ("x86_64" + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c + ,@(cond + ((version>=? version "17.0") + '("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm" + "goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere" + "sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell" + "core-avx2" "broadwell" "skylake" "skylake-avx512" "skx" + "cascadelake" "cooperlake" "cannonlake" "icelake-client" + "rocketlake" "icelake-server" "tigerlake" "sapphirerapids" + "alderlake" "raptorlake" "meteorlake" "sierraforest" "grandridge" + "graniterapids" "graniterapids-d" "emeraldrapids" "knl" "knm" "k8" + "athlon64" "athlon-fx" "opteron" "k8-sse3" "athlon64-sse3" + "opteron-sse3" "amdfam10" "barcelona" "btver1" "btver2" "bdver1" + "bdver2" "bdver3" "bdver4" "znver1" "znver2" "znver3" "znver4" + "x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4")) + ((version>=? version "16.0") + '("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm" + "goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere" + "sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell" + "core-avx2" "broadwell" "skylake" "skylake-avx512" "skx" + "cascadelake" "cooperlake" "cannonlake" "icelake-client" + "rocketlake" "icelake-server" "tigerlake" "sapphirerapids" + "alderlake" "raptorlake" "meteorlake" "sierraforest" "grandridge" + "graniterapids" "emeraldrapids" "knl" "knm" "k8" "athlon64" + "athlon-fx" "opteron" "k8-sse3" "athlon64-sse3" "opteron-sse3" + "amdfam10" "barcelona" "btver1" "btver2" "bdver1" "bdver2" + "bdver3" "bdver4" "znver1" "znver2" "znver3" "znver4" "x86-64" + "x86-64-v2" "x86-64-v3" "x86-64-v4")) + ((version>=? version "15.0") + '("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm" + "goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere" + "sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell" + "core-avx2" "broadwell" "skylake" "skylake-avx512" "skx" + "cascadelake" "cooperlake" "cannonlake" "icelake-client" + "rocketlake" "icelake-server" "tigerlake" "sapphirerapids" + "alderlake" "knl" "knm" "k8" "athlon64" "athlon-fx" "opteron" + "k8-sse3" "athlon64-sse3" "opteron-sse3" "amdfam10" "barcelona" + "btver1" "btver2" "bdver1" "bdver2" "bdver3" "bdver4" "znver1" + "znver2" "znver3" "x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4")) + ((version>=? version "13.0") + '("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm" + "goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere" + "sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell" + "core-avx2" "broadwell" "skylake" "skylake-avx512" "skx" + "cascadelake" "cooperlake" "cannonlake" "icelake-client" + "rocketlake" "icelake-server" "tigerlake" "sapphirerapids" + "alderlake" "knl" "knm" "k8" "athlon64" "athlon-fx" "opteron" + "k8-sse3" "athlon64-sse3" "opteron-sse3" "amdfam10" "barcelona" + "btver1" "btver2" "bdver1" "bdver2" "bdver3" "bdver4" "znver1" + "znver2" "znver3" "x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4")) + ((version>=? version "9.0") + '("atom" "silvermont" "slm" "goldmont" "goldmont-plus" "tremont" + "nehalem" "corei7" "westmere" "sandybridge" "corei7-avx" + "ivybridge" "core-avx-i" "haswell" "core-avx2" "broadwell" + "skylake" "skylake-avx512" "skx" "cascadelake" "cooperlake" + "cannonlake" "icelake-client" "icelake-server" "knl" "knm" "k8" + "athlon64" "athlon-fx" "opteron" "k8-sse3" "athlon64-sse3" + "opteron-sse3" "amdfam10" "barcelona" "btver1" "btver2" "bdver1" + "bdver2" "bdver3" "bdver4" "znver1" "znver2" "x86-64")) + (else '())))))) (define-public (make-clang-toolchain clang libomp) (package