[PATCH] D89671: [LLVM][OpenMP] Adding support for OpenMP sections construct in OpenMPIRBuilder

Chirag Khandelwal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 05:51:34 PST 2021


AMDChirag added a subscriber: ftynse.
AMDChirag added a comment.

@jdoerfert @fghanim @ftynse `createStaticWorkshareLoop` creates its own Entry/ExitCalls, but `EmitOMPInlinedRegion` also requires those as parameters.
What should I do about that?

1. One way would be to pass `nullptr`s for the Entry/ExitCall parameters of `EmitOMPInlinedRegion` and modify `EmitOMPInlinedRegion`, `emitCommonDirectiveEntry`, and `emitCommonDirectiveExit` to handle the case of `nullptr` being provided to them.
2. Another way would be to make the `ExitCall` parameter of `EmitOMPInlinedRegion` to be a reference and have its value set inside the body callback of `EmitOMPInlinedRegion`. `EntryCall` would not be required since the `Conditional` parameter is `false` anyway. But this feels more like a hack/workaround and would probably make the codebase awkward.

Please let me know y'all's thoughts on this? How should I proceed? I am leaning towards `1.` but any different thought/idea is most appreciated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89671/new/

https://reviews.llvm.org/D89671



More information about the llvm-commits mailing list