This is an archive of the discontinued LLVM Phabricator instance.

tsan: don't consider debug calls as calls
ClosedPublic

Authored by dvyukov on Nov 17 2021, 5:00 AM.

Details

Summary

Tsan pass does 2 optimizations based on presence of calls:

  1. Don't emit function entry/exit callbacks if there are no calls

and no memory accesses.

  1. Combine read/write of the same variable if there are no

intervening calls.
However, all debug info is represented as CallInst as well
and thus effectively disables these optimizations.
Don't consider debug info calls as calls.

Diff Detail

Event Timeline

dvyukov created this revision.Nov 17 2021, 5:00 AM
dvyukov requested review of this revision.Nov 17 2021, 5:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 17 2021, 5:00 AM
glider accepted this revision.Nov 17 2021, 5:05 AM

LGTM

This revision is now accepted and ready to land.Nov 17 2021, 5:05 AM
melver accepted this revision.Nov 17 2021, 5:13 AM
This revision was automatically updated to reflect the committed changes.