[Openmp-commits] [PATCH] D62393: [OPENMP][NVPTX]Mark parallel level counter as volatile.

Artem Belevich via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jun 26 08:53:00 PDT 2019


tra added inline comments.


================
Comment at: libomptarget/deviceRTLs/nvptx/src/supporti.h:95-99
+#ifdef __LP64__
+               "l"
+#else  // __LP64__
+               "r"
+#endif // __LP64__
----------------
Perhaps it can be deduped into something like this:
```
#ifdef __LP64__
#define PTR_CONSTRAINT               "l"
#else  // __LP64__
#define PTR_CONSTRAINT               "r"
#endif // __LP64__

... 
asm volatile("st.volatile.u8 [%1], %0;" ::"r"(Val), : PTR_CONSTRAINT (&parLevel) 
             : "memory");

```


Repository:
  rOMP OpenMP

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

https://reviews.llvm.org/D62393





More information about the Openmp-commits mailing list