This is an archive of the discontinued LLVM Phabricator instance.

Remove object_error::success and use std::error_code() instead
ClosedPublic

Authored by ruiu on Jun 8 2015, 9:11 PM.

Details

Summary

make_error_code(object_error) is slow because object::object_category()
uses a ManagedStatic variable. But the real problem is that the function is
called too frequently. This patch uses std::error_code() instead of
object_error::success. In most cases, we return "success", so this patch
reduces number of function calls to that function.

Diff Detail

Event Timeline

ruiu updated this revision to Diff 27360.Jun 8 2015, 9:11 PM
ruiu retitled this revision from to Remove object_error::success and use std::error_code() instead.
ruiu updated this object.
ruiu edited the test plan for this revision. (Show Details)
ruiu added a reviewer: Bigcheese.
ruiu set the repository for this revision to rL LLVM.
ruiu added subscribers: rnk, silvas, yaron.keren and 2 others.
Bigcheese accepted this revision.Jun 8 2015, 10:07 PM
Bigcheese edited edge metadata.

lgtm

This revision is now accepted and ready to land.Jun 8 2015, 10:07 PM
rafael accepted this revision.Jun 10 2015, 10:40 AM
rafael added a reviewer: rafael.
rafael added a subscriber: rafael.

This is awesome :-)
LGTM

Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r239409.