-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flang should handle the -mtune option #84947
Comments
PR for basic mtune support: #95043 |
@llvm/issue-subscribers-flang-driver Author: Philipp Edelmann (tukss)
`flang-new` already knows about the `-march` option but not about `-mtune`. `clang` (and also `gcc`/`gfortran`) handles both options. For context, `-mtune` produces code that's optimized for a certain subarchitecture (say `haswell` or `zen3`) while retaining compatibility with other subarchitectures, whereas `-march` might produce illegal instructions when run on the wrong hardware.
My reason for asking is that is makes it hard to use Even if |
@llvm/issue-subscribers-flang-ir Author: Philipp Edelmann (tukss)
`flang-new` already knows about the `-march` option but not about `-mtune`. `clang` (and also `gcc`/`gfortran`) handles both options. For context, `-mtune` produces code that's optimized for a certain subarchitecture (say `haswell` or `zen3`) while retaining compatibility with other subarchitectures, whereas `-march` might produce illegal instructions when run on the wrong hardware.
My reason for asking is that is makes it hard to use Even if |
@AlexisPerry , thanks for working on this! Given that #95043 has landed, can we close this ticket? |
I was just about to test it but then I've seen it has been reverted in #96678. |
@llvm/issue-subscribers-flang-frontend Author: Philipp Edelmann (tukss)
`flang-new` already knows about the `-march` option but not about `-mtune`. `clang` (and also `gcc`/`gfortran`) handles both options. For context, `-mtune` produces code that's optimized for a certain subarchitecture (say `haswell` or `zen3`) while retaining compatibility with other subarchitectures, whereas `-march` might produce illegal instructions when run on the wrong hardware.
My reason for asking is that is makes it hard to use Even if |
Yes, the option works fine for me on the current |
flang-new
already knows about the-march
option but not about-mtune
.clang
(and alsogcc
/gfortran
) handles both options. For context,-mtune
produces code that's optimized for a certain subarchitecture (sayhaswell
orzen3
) while retaining compatibility with other subarchitectures, whereas-march
might produce illegal instructions when run on the wrong hardware.My reason for asking is that is makes it hard to use
flang-new
within Spack. Spack handlesflang-new
as the Fortran component of theclang
compiler but unfortunately doesn't provide a way to specify different compiler flags for the C, C++, and Fortran compilers.-mtune
is used as an option for most architectures (e.g., here), which breaks usingflang-new
to build anything with Spack.Even if
-mtune
wasn't implemented immediately it would at least be helpful ifflang-new
wouldn't just stop compilation but just display a warning and continue.The text was updated successfully, but these errors were encountered: