This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP] Create non-const ident_t structs.
ClosedPublic

Authored by mikerice on Aug 27 2018, 4:52 PM.

Details

Summary

ITT Notify in the OpenMP runtime uses (and writes to) the reserved_2 field in the ident_t struct. See __kmp_itt_region_forking in openmp/runtime/src/kmp_itt.inl. Currently clang is creating these structs const and segfaults occur when running with analysis tools using libittnotify.

The proposed change creates the ident_t object non-const and modifies the tests accordingly.

Diff Detail

Repository
rL LLVM

Event Timeline

mikerice created this revision.Aug 27 2018, 4:52 PM

When is ITT Notify used? Does it have some preconditions like debug info, some optimizations level etc.?

When is ITT Notify used? Does it have some preconditions like debug info, some optimizations level etc.?

The libittnotify library is used by Intel tools (VTune Amplifier, Inspector, Spatial Advisor, etc.), may be used by others but I am not aware of any. Intel Tools development team still have no plans in near future to move to standard OMPT interface, mostly because the standard OpenMP Tools interface still lacks some important for customers features (like barrier imbalance reporting).

It does not have any preconditions, although the presence of debug info usually helps to get better info in the tool. So, users are free to use tools without debug info and with any optimization level.

This revision is now accepted and ready to land.Aug 29 2018, 6:12 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.