This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Remove 'unnecessary parentheses'
ClosedPublic

Authored by Hahnfeld on Aug 7 2019, 6:38 AM.

Details

Summary

The variables in kmp_lock.cpp are really arrays of function pointers
that return void or int, not pointers to functions that return void*
or int*. The other changes are only cosmetic.

Diff Detail

Repository
rL LLVM

Event Timeline

Hahnfeld created this revision.Aug 7 2019, 6:38 AM
Herald added a project: Restricted Project. · View Herald Transcript
AndreyChurbanov added inline comments.Aug 7 2019, 7:48 AM
openmp/runtime/src/kmp_runtime.cpp
5708 ↗(On Diff #213868)

I think these extra parentheses " (*)" can also be changed to "*".

jdoerfert accepted this revision.Aug 7 2019, 11:35 AM

LGTM with @AndreyChurbanov comment addressed.

openmp/runtime/cmake/config-ix.cmake
55 ↗(On Diff #213868)

Good (that we enable the warning), bad that there are so many disabled...

This revision is now accepted and ready to land.Aug 7 2019, 11:35 AM
Hahnfeld marked 2 inline comments as done.Aug 7 2019, 12:09 PM
Hahnfeld added inline comments.
openmp/runtime/cmake/config-ix.cmake
55 ↗(On Diff #213868)

Please see the RFC on openmp-dev and D65867.

openmp/runtime/src/kmp_runtime.cpp
5708 ↗(On Diff #213868)

Yes, I'll update the patch as soon as I find time.

Hahnfeld updated this revision to Diff 214557.Aug 11 2019, 4:06 AM
Hahnfeld marked 2 inline comments as done.

Remove another unnecessary cast.

Hahnfeld marked an inline comment as done.Aug 11 2019, 4:07 AM
Hahnfeld added inline comments.
openmp/runtime/src/kmp_runtime.cpp
5708 ↗(On Diff #213868)

I've opted to just remove the cast altogether. (I'm not really sure why we need a pointer to kmp_team_t *here, but I guess there have been $reasons...)

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2019, 6:26 AM