<div dir="ltr">Hi,<br><br>I'm looking into what could be the best way to add compiler flags for Clang to emit optimized code for a specific chip on a given architecture. <br><br>Looking at various sources I saw that:<br><ul><li>llc -march=<architecture> -mcpu=help</li></ul>returns the list of the supported cpus which is already helpful. The piece of information I'm currently missing is how to translate llc's flags like: <div><ul><li>`-march=x86-64 -mcpu=broadwell`</li><li>`-march=aarch64 -mattr=+v8.1a,+fp-armv8,+neon,+crc,+crypto`</li></ul>etc. into something that is understood by clang.<br><div><br>In case the context for doing this is of interest, I'm a core developer of a package manager focused on HPC (<a href="https://github.com/spack/spack">https://github.com/spack/spack</a>) and we'll use this information to automatically inject optimization flags when installing application from sources based on the chip selected by the user.<br><br>Cheers,<br>Massimiliano Culpo<br></div></div></div>