This is an archive of the discontinued LLVM Phabricator instance.

[Libomptarget] Address existing warnings in the device runtime library
ClosedPublic

Authored by jhuber6 on May 10 2022, 2:40 PM.

Details

Summary

This patche attemps to address the current warnings in the OpenMP
offloading device runtime. Previously we did not see these because we
compiled the runtime without the standard warning flags enabled.
However, these warnings are used when we now build the static library
version of this runtime. This became extremely noisy when coupled with
the fact the we compile each file roughly 32 times when all the
architectures are considered. So it would be ideal to not have all these
warnings show up when building.

Most of these errors were simply implicit switch-case fallthroughs,
which can be addressed using C++17's fallthrough attribute. Additionally
there was a volatile variable that was being casted away. This is most
likely safe to remove because we cast it away before its even used and
didn't seem to affect anything in testing.

Depends on D125260

Diff Detail

Event Timeline

jhuber6 created this revision.May 10 2022, 2:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2022, 2:40 PM
jhuber6 requested review of this revision.May 10 2022, 2:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2022, 2:40 PM
jdoerfert accepted this revision.May 10 2022, 2:51 PM

LG

openmp/libomptarget/DeviceRTL/src/State.cpp
302

This should always be 32, was a copy & paste error before.

This revision is now accepted and ready to land.May 10 2022, 2:51 PM