1 Client Code . Generated . libgccjit.so
3 . . JIT API . JIT "Frontend". (libbackend.a)
4 ....................................................................................
6 ──────────────────────────> . .
10 . . │ (error-checking).
12 . . ──> jit-recording.c
13 . . (record API calls)
16 <─────────────────────────── . .
19 V . . gcc_jit_context_compile .
20 ──────────────────────────> . .
24 . . V───────────────────────> toplev::main (for now)
26 . . . . (various code)
29 . . . <───────────────── langhook:parse_file
31 . . . │ (jit_langhook_parse_file)
33 ..........................................│..................VVVVVVVVVVVVV...
34 . . . │ . No GC in here
35 . . . │ jit-playback.c
36 . . . │ (playback of API calls)
37 . . . ───────────────> creation of functions,
38 . . . . types, expression trees
39 . . . <──────────────── etc
40 . . . │(handle_locations: add locations to
41 . . . │ linemap and associate them with trees)
43 . . . │ . No GC in here
44 ..........................................│..................AAAAAAAAAAAAA...
45 . . . │ for each function
48 . . . ────────────> cgraph_finalize_function
52 . . . ──────────────────> (end of
53 . . . . │ langhook_parse_file)
55 . . . . (various code)
58 . . . <───────────────── langhook:write_globals
60 . . . │ (jit_langhook_write_globals)
63 . . . ──────────────────> finalize_compilation_unit
65 . . . . (the middle─end and backend)
67 . . <───────────────────────────── end of toplev::main
70 . . │ Convert assembler to DSO
73 <─────────────────────────── . .
78 ───────────────> . . .
81 <─────────────── . . .