arsenm added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:394-395
+  // Get the last argument of -mwavefrontsize64 or -mno-wavefrontsize64.
+  for (auto WaveArg : Args.filtered_reverse(options::OPT_mwavefrontsize64,
+                                            options::OPT_mno_wavefrontsize64)) 
{
+    if (WaveArg->getOption().getID() == options::OPT_mwavefrontsize64) {
----------------
yaxunl wrote:
> arsenm wrote:
> > Why isn't this using hasFlag?
> > e.g. like        
> > 
> > ```
> > DriverArgs.hasFlag(options::OPT_fcuda_flush_denormals_to_zero,
> >                            options::OPT_fno_cuda_flush_denormals_to_zero,
> >                            getDefaultDenormsAreZeroForTarget(Kind)))
> > ```
> hasFlag always return true or false, but here we have 3 cases : no arg, last 
> arg is wave64, last arg is no-wave64.
hasFlag considers all of these. The features only really need to add 
+wavefrontsze64 or not based on true or false, the rest is just noise


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

https://reviews.llvm.org/D88370

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

Reply via email to