This is an archive of the discontinued LLVM Phabricator instance.

[tsan] On OS X, optimize main thread’s ThreadState accesses
ClosedPublic

Authored by kubamracek on Jun 2 2016, 7:21 AM.

Details

Summary

This is a very simple optimization that gets about 10% speedup for certain programs. We’re currently storing the pointer to the main thread’s ThreadState, but we can store the state directly in a static variable, which avoid the load acquire.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek updated this revision to Diff 59375.Jun 2 2016, 7:21 AM
kubamracek retitled this revision from to [tsan] On OS X, optimize main thread’s ThreadState accesses.
kubamracek updated this object.
kubamracek added a reviewer: dvyukov.
kubamracek added a project: Restricted Project.
kubamracek added subscribers: llvm-commits, zaks.anna.
dvyukov accepted this revision.Jun 2 2016, 7:27 AM
dvyukov edited edge metadata.
This revision is now accepted and ready to land.Jun 2 2016, 7:27 AM
This revision was automatically updated to reflect the committed changes.