This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][FIX] Do not adjust the level after the environment was popped
ClosedPublic

Authored by jdoerfert on Oct 20 2021, 8:46 AM.

Details

Summary

Exiting a data environment will reset all values, it is wrong to adjust
them afterwards.

Diff Detail

Event Timeline

jdoerfert created this revision.Oct 20 2021, 8:46 AM
jdoerfert requested review of this revision.Oct 20 2021, 8:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 20 2021, 8:46 AM
Herald added a subscriber: sstefan1. · View Herald Transcript
tianshilei1992 accepted this revision.Oct 20 2021, 9:49 AM

LGTM. Or to make it symmetrical, which is pointless though.

void __kmpc_end_serialized_parallel(IdentTy *, uint32_t TId) {
  --icv::Level;
  state::exitDataEnvironment();
}
This revision is now accepted and ready to land.Oct 20 2021, 9:49 AM