This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Cleanup code
ClosedPublic

Authored by jlpeyton on Jul 9 2018, 3:54 PM.

Details

Summary

This patch cleans up unused functions, variables, sign compare issues, and addresses some -Warning flags which are now enabled including -Wcast-qual. Not all the warning flags in LibompHandleFlags.cmake are enabled, but some are with this patch.

Some __kmp_gtid_from_* macros in kmp.h are switched to static inline functions which allows us to remove the awkward definition of KMP_DEBUG_ASSERT() and KMP_ASSERT() macros which used the comma operator. This had to be done for the innumerable -Wunused-value warnings related to KMP_DEBUG_ASSERT() (at least for gcc)

Diff Detail

Repository
rL LLVM

Event Timeline

jlpeyton created this revision.Jul 9 2018, 3:54 PM
jlpeyton updated this revision to Diff 154726.Jul 9 2018, 4:03 PM

Forgot to merge in the CCAST() update from earlier today.

jlpeyton updated this revision to Diff 156882.Jul 23 2018, 2:40 PM

Updated patch so that -Warning flags are only included in stand alone builds since the LLVM in-tree builds already include the warning flags.

jlpeyton updated this revision to Diff 157997.Jul 30 2018, 10:33 AM

Removing switch statement changes as they would need a closer look in a future patch.

tlwilmar accepted this revision.Aug 6 2018, 1:41 PM

LGTM

This revision is now accepted and ready to land.Aug 6 2018, 1:41 PM
This revision was automatically updated to reflect the committed changes.