The os.hpp header gets added to the include path of legacy llvm via the compiler lib. Having "windows.h" included causes a lot conflicts with LLVM headers, as they forward declare many Windows types. Best to not include it here.
Change-Id: I60c44a8d28660368f1a4a95741e1053ef3528fa1
Replace amd::Atomic with std::atomic. Remove make_atomic uses by
converting the variable to std::atomic and making sure the memory
order is relaxed when synchronizes-with is not needed.
Delete utils/atomic.hpp.
Change-Id: I0b36db8d604a8510ac6e36b32885fd16a1b8ccfa
When HIP_ENABLE_DEFERRED_LOADING=0, many global variables will be
referenced but they are not initialized in that early time. The patch
will use constexpr to initialze global constant varables in compile
time.
Change-Id: I9d538b7abc6a0ce700ec3332b97fc144db5fc1ef
e.g.:
warning: expression does not compute the number of elements in this
array; element type is '__cpu_mask' (aka 'unsigned long'), not
'uint32_t' (aka 'unsigned int') [-Wsizeof-array-div]
for (uint i = 0; i < sizeof(mask_.__bits) / sizeof(uint32_t); ++i) {
__bits is a __cpu_mask, which is a 64-bit type. These were accessed
through uint32_t pointers so the loop bound should have been
correct. These operations can be done directly on the 64-bit type so
we can leave the array size pattern, and eliminate the casts.
The case in getNextSet should probably be rephrased in terms of
__cpu_mask to avoid the pointer casting, but this is tricker than the
other cases so I used the easy option to quiet the warning.
Change-Id: I1332584fad58439ccd9d369589519a9918e1678e