[gomp4] Add tables generation

Jakub Jelinek jakub@redhat.com
Thu Mar 27 15:12:00 GMT 2014


On Thu, Mar 27, 2014 at 05:31:29PM +0400, Ilya Verbin wrote:
> >+#ifdef ACCEL_COMPILER
> >+  /* Decls are placed in reversed order in fat-objects, so we need to
> >+     revert them back if we compile target.  */
> >...
> 
> Actually this change is incorrect.  If host binary is built with -flto, then
> both host gcc and target gcc read decls from lto and target_lto sections in the
> same order, and resulting tables are identical.
> So, in this case there is no need to change the order.
> 
> But what if one wants to link non-lto host object files with a target image,
> produced from target_lto sections?
> In this case the order of host table, produced during ordinary compilation will
> differ from the order of target table, produced during lto compilation.
> 
> Jakub, what do you think?

The tables need to be created before IPA, that way it really shouldn't
matter in what order you emit them.  E.g. the outlined target functions
could be added to the table during ompexp pass which actually creates the
outlined functions, the vars need to be added before target lto or host lto
is streamed.

	Jakub



More information about the Gcc-patches mailing list