[PATCH] Don't use ManagedStatic.

Michael Spencer bigcheesegs at gmail.com
Mon Jun 8 21:00:08 PDT 2015


On Mon, Jun 8, 2015 at 8:16 PM, Rui Ueyama <ruiu at google.com> wrote:
> On Mon, Jun 8, 2015 at 7:45 PM, Sean Silva <chisophugis at gmail.com> wrote:
>>
>> What is calling object::object_category so much that it can occupy 9% of
>> the run time? If that code path is sufficiently common maybe it should just
>> not be using "errors" in the first place.
>
>
> Good point. There are many places in include/llvm/Object where we return
> object_error::success. That seems the cause of this problem.
>
> Maybe we should remove object_error::success and use std::error_code
> instead.
>
> Any objection?

No objection here, std::error_code() compares equal to
object_error::success, and the category isn't useful in this context.
No reason not to. Although I would still like to solve the managed
static sucks on Windows problem.

- Michael Spencer

>
>>
>> Overall, just relying on thread-safe statics is preferable, but even then
>> having so many non-inlined calls to this function in regular operation
>> doesn't seem right.
>>
>>
>> http://reviews.llvm.org/D10303
>>
>> EMAIL PREFERENCES
>>   http://reviews.llvm.org/settings/panel/emailpreferences/
>>
>>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list