According to the standard, the reference counter of global objects should be positive infinity. Right now it is set to 1.
Details
Details
- Reviewers
jlpeyton Hahnfeld jhen - Commits
- rGd57681b70325: [OpenMP] libomptarget: Set ref count for global objects to positive infinity
rOMP301076: [OpenMP] libomptarget: Set ref count for global objects to positive infinity
rL301076: [OpenMP] libomptarget: Set ref count for global objects to positive infinity
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Fixed bug.
libomptarget/src/omptarget.cpp | ||
---|---|---|
1326–1327 | Right, I overlooked this one... | |
1331–1334 | One of the casts is necessary. CurrHostEntry->addr is of type void *. In order to add to it the size of the entry (CurrHostEntry->addr + CurrHostEntry->size) it must be cast to an integral type. The other casts are optional, but it helps make clear that the entries of struct HostDataToTargetTy are of type uintptr_t. |
Shouldn't this be the other way round? If we already added this mapping before, just continue?