HomePhabricator

[LIBOMPTARGET] Do not increment/decrement the refcount for "declare target"…

Authored by grokos on Jan 14 2020, 4:30 PM.

Description

[LIBOMPTARGET] Do not increment/decrement the refcount for "declare target" objects

The reference counter for global objects marked with declare target is INF. This patch prevents the runtime from incrementing /decrementing INF refcounts. Without it, the map(delete: global_object) directive actually deallocates the global on the device. With this patch, such a directive becomes a no-op.

Differential Revision: https://reviews.llvm.org/D72525