Extending GCC with new optimization

Ian Lance Taylor iant@google.com
Sat Aug 18 17:09:00 GMT 2012


On Fri, Aug 17, 2012 at 12:22 AM, Tomasz Jankowski <tomcioj@gmail.com> wrote:
>
> For one of my projects at university I have to create specific
> optimization for GCC (in general I have to find arithmetic operations
> in basic blocks and modify them a bit). I have some idea about
> compilation process etc. but i't more theoretical then practical
> knowledge.
>
> Now I'm slowly learning about GCC internals and as I see I can
> "easily" solve my problem by writing plugin in C. On the other hand I
> found MELT project. At the moment I'm in point in which I'm not sure
> which path I should choose: write MELT extension or write plugin in C.
> I can also mention that my target is GCC 4.5.
>
> Actually I don't know how can I treat plugins support in GCC. It's
> low-level infrastructure for projects like MELT or straight way to
> write static optimization?

Both approaches will work.  Which you adopt depends on your preferences.

GCC plugins are not only to support projects like MELT, they are also
for direct use.

Ian



More information about the Gcc-help mailing list