Primary Author: @anchu-rajendran
This patch adds section support in the OpenMP IRBuilder module. Also added a test for it.
AMDChirag on Oct 19 2020, 12:39 AM.Authored by
There are a very large number of changes, so older changes are hidden. Show Older Changes
Amended the original commit, applying the fixes:
Some drive-by comments. I will assume @fghanim continues the review, feel free to not wait on me.
Great work. Thanks.
Also, please add the revision where this is used in clang as a child revision. It's a great validity check for this, and also showcases the intended way this is expected to be used. Up to this point I have been guessing the intent.
One idea: Now with D90830 landed, CreateSections could be implemented by calling that (with TripCount == Number of sections), then call "CreateWorkshareLoop" (the same that we would use to implement #pragma omp for) to it, this would allow us to share the implementations of worksharing-loop and sections.
CreateWorkshareLoop does not exist yet, we might refactor this code once it exists.
I second @Meinersbur comment. Reducing duplication is always better :)
Updated code, test case, fixed some issues
createSections() now uses EmitOMPInlinedRegion().
The clang side updates will be pushed soon (D91054).
Added the use of createCanonicalLoop and createStaticWorkshareLoop.