[PATCH] Remove static initializers from MCSchedModel

Pete Cooper peter_cooper at apple.com
Fri Aug 29 14:14:49 PDT 2014


> On Aug 29, 2014, at 2:10 PM, Andrew Trick <atrick at apple.com> wrote:
> 
> 
>> On Aug 29, 2014, at 9:38 AM, Pete Cooper <peter_cooper at apple.com> wrote:
>> 
>> Hi all
>> 
>> Please review this patch to change MCSchedModel to avoid static initializers.  This makes it behavior match other structs with similar uses, e.g., MCWriteProcResEntry and MCProcResourceDesc.
>> 
>> This is part of the work to remove all the static initializers from LLVM.
> 
> 
> Great. I can’t remember why we needed a default ctor on MCSchedModel any more. If we can get away with constant static initialization it’s much better.
> 
> I would define an LLVM_DELETED_FUNCTION default ctor to make sure we’re not silently breaking some target.
> 
> LGTM.
Thanks Andy.  I’ll add the deleted constructor.

I’m preparing an updated patch now based on Chandler’s feedback so that we can see how we want to proceed with this.

Thanks,
Pete
> 
> -Andy





More information about the llvm-commits mailing list