Adding Hwloc library option for affinity mechanism

These changes allow libhwloc to be used as the topology discovery/affinity
mechanism for libomp.  It is supported on Unices. The code additions:
* Canonicalize KMP_CPU_* interface macros so bitmask operations are
  implementation independent and work with both hwloc bitmaps and libomp
  bitmaps.  So there are new KMP_CPU_ALLOC_* and KMP_CPU_ITERATE() macros and
  the like. These are all in kmp.h and appropriately placed.
* Hwloc topology discovery code in kmp_affinity.cpp. This uses the hwloc
  interface to create a libomp address2os object which the rest of libomp knows
  how to handle already.
* To build, use -DLIBOMP_USE_HWLOC=on and
  -DLIBOMP_HWLOC_INSTALL_DIR=/path/to/install/dir [default /usr/local]. If CMake
  can't find the library or hwloc.h, then it will tell you and exit.

Differential Revision: http://reviews.llvm.org/D13991

llvm-svn: 254320
GitOrigin-RevId: 01dcf36bd54be75dcf6c3cc9cc8d1f20e783d86a
18 files changed
tree: 57c56b992ea10737610bdd60fc563da8a6decb7a
  1. offload/
  2. runtime/
  3. testsuite/
  4. www/
  5. CMakeLists.txt
  6. CREDITS.txt
  7. LICENSE.txt