This patch introduces an LLVM optimization for target regions (TRegions)
that tries to enable SPMD-mode or use custom state machines for the
TRegion have been introduced in https://reviews.llvm.org/D59319 .
The interface is deliberately simple to be easily analyzable in the
middle end. Design decisions included:
- Hide all (complex) implementation choices in the runtime library but allow complete removal of the abstraction once the runtime is inlined.
- Provide all runtime calls with sufficient, easy encoded information.
- Make the LLVM optimization, even though tied to the TRegion interface, as general as possible.
Positive and negative examples for the LLVM optimization are provided in the