summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/PatternMatch.cpp
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2017-06-13 17:16:12 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2017-06-13 17:16:12 +0000
commitd330e630dbf0a29179b594a287d16cab77e5941d (patch)
tree61447a57f1d330cd8044e3a1fce8155cebd6debe /llvm/unittests/IR/PatternMatch.cpp
parentb3a8d20e27b41be00e1876c606d43c5794815e0b (diff)
downloadbcm5719-llvm-d330e630dbf0a29179b594a287d16cab77e5941d.tar.gz
bcm5719-llvm-d330e630dbf0a29179b594a287d16cab77e5941d.zip
Reset initial affinity in children processes
If OpenMP is initialized before fork()-ing occurs and affinity is set to something like compact, then the master thread will be pinned to a single HW thread/core after initialization. If the master (or any other thread) then forks N processes, all N processes will then be pinned to that same single HW thread/core. To reset the affinity for the new child process, the atfork handler for the child process can call kmp_set_thread_affinity_mask_initial() to reset its affinity to the initial affinity of the application before it re-initializes libomp. The parent process will not be affected and still keeps its affinity setting. Differential Revision: https://reviews.llvm.org/D34118 llvm-svn: 305306
Diffstat (limited to 'llvm/unittests/IR/PatternMatch.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud