[OMPT] Handle null pointer in set_callback to improve performance
[OMPT] Handle null pointer in set_callback to improve performance

We use the bitmap ompt_enabled thoughout the runtime, to avoid loading the
vector of callback functions when testing if specific code should be executed.
Before invoking an event callback function, the pointer is tested for NULL.

This revision resets the corresponding bit in ompt_enabled to 0 if
NULL is passed in set_callback.

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

git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@321264 91177308-0d34-0410-b5e6-96231b3b80d8

llvm-mirror/openmp,llvm-mirror/openmp,llvm-mirror/openmp,llvm-mirror/openmp,llvm-mirror/openmp