yaxunl 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) {
----------------
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.


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