[OpenMPIRBuilder] introduce createStaticWorkshareLoop
authorAlex Zinenko <zinenko@google.com>
Wed, 2 Dec 2020 11:53:12 +0000 (12:53 +0100)
committerAlex Zinenko <zinenko@google.com>
Mon, 7 Dec 2020 21:30:59 +0000 (22:30 +0100)
commitc102c783cd08cb1bf9119fe33cce34f6d1563881
treec4f63786228e25d625725f131969d3e1c820b0f9
parent6249bfeefeed7ee2634355d4d7523b46fb00fda6
[OpenMPIRBuilder] introduce createStaticWorkshareLoop

Introduce a function that creates a statically-scheduled workshare loop
out of a canonical loop created earlier by the OpenMPIRBuilder. This
basically amounts to injecting runtime calls to the preheader and the
after block and updating the trip count. Static scheduling kind is
currently hardcoded and needs to be extracted from the runtime library
into common TableGen definitions.

Differential Revision: https://reviews.llvm.org/D92476
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp