[PATCH] D94961: [OpenMP] Add OpenMP offloading toolchain for AMDGPU

Pushpinder Singh via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 2 03:59:01 PST 2021


pdhaliwal added inline comments.


================
Comment at: clang/lib/Driver/Driver.cpp:755
+                      *this, TT, *HostTC, C.getInputArgs(), Action::OFK_OpenMP);
+                else if (TT.isAMDGCN())
+                  DeviceTC =
----------------
JonChesterfield wrote:
> Minor suggestion,
> ```
> if (TT.isNVPTX() {
>  ...
> } else {
>   assert(TT.isAMDGCN());
>   ...
> }```
> 
> ? Semantically equivalent, but `if () else if ()` looks like there is a missing else clause.
I think, having assert in last else is bit cleaner.  What do you think?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94961



More information about the cfe-commits mailing list