GCC Plugin: How to replace an existing pass from plugin

Tarun Prabhu tarunprabhu@gmail.com
Mon Jun 1 16:27:00 GMT 2015


I am trying to resurrect a GCC plugin which has been dormant for some
time (DragonEgg: http://dragonegg.llvm.org/) but I am running into
some trouble with the new pass manager which I was hoping someone can
help me with.

The plugin takes over some optimization and code generation passes by
replacing a reference pass. For instance:

>  pass_info.reference_pass_name = "early_optimizations";
>  pass_info.ref_pass_instance_number = 0;
>  pass_info.pos_op = PASS_POS_REPLACE;
>  register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);

But I can't seem to figure out how to do it in 4.9.2. I noticed that
some of the passes being referenced in the plugin were removed in 4.9,
but there don't seem to be names that I can use to identify passes in
4.9.

I'd appreciate any help in figuring out how to do this with the new
pass manager.

Thanks,



More information about the Gcc-help mailing list