https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118401

Bert Wesarg <Bert.Wesarg at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Bert.Wesarg at googlemail dot 
com

--- Comment #4 from Bert Wesarg <Bert.Wesarg at googlemail dot com> ---
I once dived into this rabbit hole and this is my understanding:

1. the front end does its usual thing, i.e., compiles the CU into GIMPLE and
applies the instrumentation and/or optimizations

2. There is a heuristic to select which functions are marked for streaming into
the LTO object file

3. The functions are streamed into the object file

4. the GIMPLE functions are lowered to the binary and also streamed into the
object file

5. At link-time the LTO plugin reads all serialized functions back in
(remember, that they are already instrumented/optimized) and compiles them into
the offloading architecture

As both the host and the target are based on the same GIMPLE, its not possible
to add something like "-Xhost" to GCC. The split between host and target would
need to happen way earlier than now.

Reply via email to