Access of Graphite through plugins interface ?

26 views
Skip to first unread message

Grégory Vaumourin

unread,
Sep 24, 2014, 5:34:09 AM9/24/14
to gcc-gr...@googlegroups.com
Hi everyone,

I'm a PHD student in CEA in Paris and I'm actually developping a plugin for GCC4.9.1 through the meta plugin MELT (with B. Starynkevitch) in order to detect read-only variables. In order to do that, I must have a precise idea of read and write of arrays in loops and I could use the polyhedral representation for my detection (I'm thinking of the phd thesis of B. Creusillet for example) . I know that in the GCC4.9.1 Graphite models are not available for plugins. I'm just wondering if there are some ways or hacks to access polyhedral representation throught the plugin interface.

So my two questions are :
           - Is there some tips or hack I could use in order to use the Graphite representation of loops in my plugin
           - Are you thinking about adding it ? Works are already been done in this direction ?

Thank you in advance ,
Regards ,

Grégory V.

Tobias Grosser

unread,
Sep 24, 2014, 7:46:58 AM9/24/14
to Grégory Vaumourin, gcc-gr...@googlegroups.com
Hi Gregory,

thanks for your interest in graphite. I am unfortunately not familiar
with the plugin infrastructure, such that I can not really give you any
advise here. What is necessary to make gcc functionality available as a
plugin?

Cheers,
Tobias

Grégory Vaumourin

unread,
Oct 14, 2014, 11:41:17 AM10/14/14
to gcc-gr...@googlegroups.com

Hi Tobias , thanks for our answer and sorry for the delay !

Just to let you know where I am in my reflexion. Now, I'm pretty sure that I need this functionality in order to realize what I want to do (yeah , took that much time ^^ ) so I'm actually working on it !
My goal here is to be able to access the polyhedral model through the plugin interface in order to do some basic data analysis on that, I'm not doing any code transformation. Basically, the data I want to manipulate in my plugin is the result of the build_scops function in graphite_transform_loops.
As far as I know, the plugin interface is working on events also called hooks defined in plugin.def. At the beginning of compilation, you can register callbacks to the events, callbacks are defined in the plugin, then during the compilation phase, events are triggered in GCC with the invoke_plugin_callbacks.
I don't know if this kind of work can interest Graphite team, I can let you know if you're interested.

Cheers ,

Gregory

Tobias Grosser

unread,
Oct 14, 2014, 11:45:26 AM10/14/14
to Grégory Vaumourin, gcc-gr...@googlegroups.com
> you know if you're interested.

Hi Gregory,

I am not personally planning to use plugins, but in case you have a use
patches to add plugin callbacks points are surly welcomed.

Tobias
Reply all
Reply to author
Forward
0 new messages