This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP]Fix PR50129: omp cancel parallel not working as expected.
ClosedPublic

Authored by ABataev on Jun 3 2021, 2:14 PM.

Details

Summary

Need to emit a call for kmpc_cancel_barrier in the exit block for
kmpc_cancel function call.

Diff Detail

Event Timeline

ABataev created this revision.Jun 3 2021, 2:14 PM
ABataev requested review of this revision.Jun 3 2021, 2:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2021, 2:15 PM
Herald added a subscriber: sstefan1. · View Herald Transcript

Do we have to update OpenMPIRBuilder::createCancel too?

ABataev updated this revision to Diff 349858.Jun 4 2021, 7:05 AM
  1. Emit __kmpc_cancel_barrier only for parallel cancellation.
  2. Synced CreateCancel.
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2021, 7:05 AM
jdoerfert accepted this revision.Jun 4 2021, 7:42 AM

LG, one nit below.

llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
537

The documentation doesn't match the prototype.

This revision is now accepted and ready to land.Jun 4 2021, 7:42 AM
This revision was landed with ongoing or failed builds.Jun 4 2021, 8:28 AM
This revision was automatically updated to reflect the committed changes.