Original source of the changes: https://github.com/jdoerfert/llvm-project/commit/12137687ee86e827f61ea8f1bfa98b050a7b3cae#diff-a6c8db9d350ec59f4eb93f27f29468b01c9590426a11c9cb79e499bc96b28adc
Rebase assumptions taken by me (Dominik Adamski):
- Patch depends on: https://reviews.llvm.org/D156423
- Johannes version of create parallel should be used only for offload pragmas
- The code generated by OMPIRBuilder::createParallel depends on the OMPIRBuilder config. If OpenMPIRBuilder is configured to generate GPU code then it will generate GPU parallel version of the parallel pragma
- Johannes changes in llvm/lib/Transforms/Utils/CodeExtractor.cpp are upstreamed
Status of the draft:
- No additional tests
- Not finished: createTargetWorkshareLoop