This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Restructure loop code for hierarchical scheduling
ClosedPublic

Authored by jlpeyton on Jun 8 2018, 3:06 PM.

Details

Summary

This patch reorganizes the loop scheduling code in order to allow hierarchical scheduling to use it more effectively. In particular, the goal of this patch is to separate the algorithmic parts of the scheduling from the thread logistics code.

  1. Moves declarations & structures to kmp_dispatch.h for easier access in other files.
  2. Extracts the algorithmic part of __kmp_dispatch_init() and __kmp_dispatch_next() into __kmp_dispatch_init_algorithm() and __kmp_dispatch_next_algorithm(). The thread bookkeeping logic is still kept in __kmp_dispatch_init() and __kmp_dispatch_next(). This is done because the hierarchical scheduler needs to access the scheduling logic without the bookkeeping logic.
  3. To prepare for new pointer in dispatch_private_info_t, a new flags variable is created which stores the ordered and nomerge flags instead of them being in two separate variables. This will keep the dispatch_private_info_t structure the same size.

Diff Detail

Repository
rL LLVM

Event Timeline

jlpeyton created this revision.Jun 8 2018, 3:06 PM
This revision is now accepted and ready to land.Jun 9 2018, 10:14 AM
This revision was automatically updated to reflect the committed changes.