[cfe-dev] A plugin proposal for clang

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Mon Oct 17 06:53:42 PDT 2011


On 11-10-15 4:44 AM, David Chisnall wrote:
> On 15 Oct 2011, at 01:31, Joshua Cranmer wrote:
>
>> • Custom optimization passes
>
> These are more likely to be LLVM plugins than clang plugins.  We
> already have a mechanism for optimisation plugins to automatically
> insert themselves into the optimiser chain - I'm using this for some
> Objective-C optimisations.
>
> These would be better loaded from a config file by the LLVM plugin
> loader, because there is no sensible way for clang to pass
> optimisation plugins to the linker for LTO.

Running the linker is the clang driver job, so I think there is some 
work to be done in there.

LLVM itself is already fairly modular, so I think the above item can be 
replaced with

* Make sure the plugin has access to the pass manager.
* Make it simpler to pass options to the linker plugins.

> David

Cheers,
Rafael





More information about the cfe-dev mailing list