Jakub, Richard, Uday,
Thanks for your answers.

On 15 Aug 20:59, Richard Biener wrote:
> Alternatively you make lto-wrapper aware of this which means that WPA stage 
> would emit extra partitions that it marks for lto-wrapper.
> 
> That sounds better than another plugin to me.  Of course WPA time might be 
> too limiting. Otoh the idea of multiple WPA stages, aka iterating lto could 
> be picked up to have a late WPA stage.
> 
> Richard.

I'm trying to implement the approach with modified lto-wrapper.
Suppose we have a bytecode of the routine foo, streamed during ompexp pass into 
some section, say .gnu.omptarget_foo.
In function lto.c:do_whole_program_analysis() an extra partition should be 
created, that will contain bytecode from .gnu.omptarget_foo, right?
As far as I understood, in addition to the bytecode of foo, we should also 
stream extra symtab_nodes, and read them somewhere in 
lto-cgraph.c:input_symtab().
This means we should maintain 2 symtabs inside WPA stage - original for host 
and new for target?

Richard, also what do you mean by "WPA time might be too limiting"?

Thanks,
    -- Ilya

Reply via email to