[PATCH] D19782: [IPO/GlobalDCE] Convert the pass to use static functions.

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 11:20:32 PDT 2016


Mehdi AMINI <mehdi.amini at apple.com> writes:
> Davide Italiano <dccitaliano at gmail.com> writes:
>> Mehdi AMINI <mehdi.amini at apple.com> writes:
>>> ================
>>> Comment at: include/llvm/Transforms/IPO/GlobalDCE.h:44
>>> @@ +43,3 @@
>>> +  bool RemoveUnusedGlobalValue(GlobalValue &GV);
>>> +};
>>> +
>>> ----------------
>>> Can we split what is the "pass" and what is the actual utility? 
>>
>> I think it's possible, but maybe overkill? Probably people with more
>> experience porting passes can tell what they think.
>
> I think this should be the standard layout, it should be the exception
> to merge together the utility logic and the pass logic.

Why? One of the nice things about the new pass manager design is that
the pass *is* a utility. They're just objects that can do the transforms
you care about and that happen to have a passmanager-compatible run
method.

I don't see how adding an extra layer of indirection would make things
better, in the general case.


More information about the llvm-commits mailing list