* Problem with the plugin interface
@ 2014-10-24 13:16 Grégory Vaumourin
0 siblings, 0 replies; only message in thread
From: Grégory Vaumourin @ 2014-10-24 13:16 UTC (permalink / raw)
To: gcc-help
Hi ,
I'm trying to update my plugins from the gcc4.8.3 to the 4.9.1 version
of GCC, the interface seems to have change abit and I don't understand
a few basic things anymore. I didn't find any examples on GCC
documentation about plugins or internet on how to register a pass with
the new interface.
I just want to install a new pass in my plugin, so I'm filling the
structure register_pass_info and pass it to the register_callback this
way :
register_callback("my_plugin_
name", PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
I don't understand how to fill the field "pass" of the structure
register_pass_info. It seems now this field is a opt_pass class and
not a simple structure anymore, same class as the internal pass of
GCC. So I naturally tried to copy what the internals pass are doing to
create a new pass, I did this for my pass :
class pass_greg : public gimple_opt_pass
{
public:
pass_greg (gcc::context ctxt)
: gimple_opt_pass (pass_data_greg, gcc::context ctxt)
{}
bool gate () { return greg_gate(); }
unsigned int execute () { return greg_pass (); }
};
but I don't undertand what is this parameter gcc::context that I need
to instantiate my pass. Moreover the opt_pass symbole is defined in
pass_manager which include a "pass-instances.def" that is not in the
plugin API
Maybe some of you have a little example to put me back on track, or
point me to some docs that I missed.
Regards,
Gregory Vaumourin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-24 13:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-24 13:16 Problem with the plugin interface Grégory Vaumourin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).