nemanjai added a comment.

In D92935#2477171 <https://reviews.llvm.org/D92935#2477171>, @kiausch wrote:
> Regarding similar GCC options:
>
> AFAIK GCC has had the spe options -msingle-float and -mdouble-float until spe 
> support was dropped after version 8.3.
> These options would kind of match here, but they are already used as MIPS 
> subtarget features in LLVM and I was not able to find out if and how it is 
> possible to use identical target features for multiple targets and if this is 
> a good idea at all? If somebody could point out how this can be done I'm 
> happy to change the options...

If GCC still supported the options, it would make sense to go through the 
effort of making the options work for PPC as well so that the two compilers are 
compatible. However, since GCC no longer has SPE support



================
Comment at: clang/include/clang/Driver/Options.td:2603
 def mno_spe : Flag<["-"], "mno-spe">, Group<m_ppc_Features_Group>;
+def mefpu2 : Flag<["-"], "mefpu2">, Group<m_ppc_Features_Group>;
 def mabi_EQ_vec_extabi : Flag<["-"], "mabi=vec-extabi">, Group<m_Group>, 
Flags<[CC1Option]>,
----------------
You might want to define what the expected behaviour if `-mefpu2` is specified 
without specifying `-mspe`. With the current implementation, it will simply be 
ignored. But you might want to make it so that specifying `-mefpu2` 
automatically causes `-mspe` to be turned on (and `-mno-spe` to turn off both 
SPE and EFPU2). This can be accomplished in 
`PPCTargetInfo::setFeatureEnabled()` in `clang/lib/Basic/Targets/PPC.cpp`.

In any case, you should add a test to `clang/test/Driver/ppc-features.cpp`.


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

https://reviews.llvm.org/D92935

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to