This is an archive of the discontinued LLVM Phabricator instance.

Remove static global GCNames from Function.cpp and move it to the Context
ClosedPublic

Authored by mehdi_amini on Jan 7 2016, 6:15 PM.

Details

Summary

This remove the need for locking when deleting a function.

Diff Detail

Event Timeline

mehdi_amini updated this revision to Diff 44304.Jan 7 2016, 6:15 PM
mehdi_amini retitled this revision from to Remove static global GCNames from Function.cpp and move it to the Context.
mehdi_amini updated this object.
mehdi_amini added reviewers: vsk, echristo.
mehdi_amini added a subscriber: llvm-commits.

Note: destroying a few thousands of Modules in my multi-threaded ThinLTO implementation goes from 27s to 16s after this patch :)

vsk edited edge metadata.Jan 7 2016, 6:23 PM

Thanks! I knew it'd be a good idea to steal some bits away from CallingConvention :). Lgtm with one change.

lib/IR/Function.cpp
382

We should also clear the subclass value data bit here.

mehdi_amini accepted this revision.Jan 7 2016, 6:32 PM
mehdi_amini added a reviewer: mehdi_amini.

Thanks for the catch. r257139

This revision is now accepted and ready to land.Jan 7 2016, 6:32 PM
mehdi_amini closed this revision.Jan 7 2016, 6:32 PM