This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 04/27] New file: gcc/jit/notes.txt


An earlier version of this was posted as part of:
      "[PATCH 06/10] Heart of the JIT implementation (was: Re: [PATCH 0/5] Merger of jit branch (v2))"
        https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01247.html

I've broken that up into separate patches for ease of review.

This first patch within gcc/jit adds a high-level overview
diagram of how the JIT library works.

gcc/jit/
	* notes.txt: New.
---
 gcc/jit/notes.txt | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)
 create mode 100644 gcc/jit/notes.txt

diff --git a/gcc/jit/notes.txt b/gcc/jit/notes.txt
new file mode 100644
index 0000000..d337cb4
--- /dev/null
+++ b/gcc/jit/notes.txt
@@ -0,0 +1,84 @@
+Client Code   . Generated .            libgccjit.so
+              . code      .
+              .           . JIT API  . JIT "Frontend". (libbackend.a)
+....................................................................................
+   â          .           .          .               .
+    ââââââââââââââââââââââââââ>      .               .
+              .           .    â     .               .
+              .           .    V     .               .
+              .           .    ââ> libgccjit.c       .
+              .           .        â (error-checking).
+              .           .        â                 .
+              .           .        ââ> jit-recording.c
+              .           .              (record API calls)
+              .           .    <âââââââ              .
+              .           .    â     .               .
+   <âââââââââââââââââââââââââââ      .               .
+   â          .           .          .               .
+   â          .           .          .               .
+   V          .           .  gcc_jit_context_compile .
+    ââââââââââââââââââââââââââ>      .               .
+              .           .    â     .               .
+              .           .    â ACQUIRE MUTEX       .
+              .           .    â     .               .
+              .           .    Vâââââââââââââââââââââââ> toplev::main (for now)
+              .           .          .               .       â
+              .           .          .               .   (various code)
+              .           .          .               .       â
+              .           .          .               .       V
+              .           .          .    <âââââââââââââââââ langhook:parse_file
+              .           .          .    â          .
+              .           .          .    â (jit_langhook_parse_file)
+              .           .          .    â          .
+..........................................â..................VVVVVVVVVVVVV...
+              .           .          .    â          .       No GC in here
+              .           .          .    â jit-playback.c
+              .           .          .    â   (playback of API calls)
+              .           .          .    âââââââââââââââ> creation of functions,
+              .           .          .               .     types, expression trees
+              .           .          .    <ââââââââââââââââ etc
+              .           .          .    â(handle_locations: add locations to
+              .           .          .    â linemap and associate them with trees)
+              .           .          .    â          .
+              .           .          .    â          .       No GC in here
+..........................................â..................AAAAAAAAAAAAA...
+              .           .          .    â for each function
+              .           .          .    ââ> postprocess
+              .           .          .        â      .
+              .           .          .        ââââââââââââ> cgraph_finalize_function
+              .           .          .        <ââââââââââââ
+              .           .          .     <ââ       .
+              .           .          .    â          .
+              .           .          .    ââââââââââââââââââ> (end of
+              .           .          .               .       â langhook_parse_file)
+              .           .          .               .       â
+              .           .          .               .   (various code)
+              .           .          .               .       â
+              .           .          .               .       â
+              .           .          .    <âââââââââââââââââ langhook:write_globals
+              .           .          .    â          .
+              .           .          .    â (jit_langhook_write_globals)
+              .           .          .    â          .
+              .           .          .    â          .
+              .           .          .    ââââââââââââââââââ> finalize_compilation_unit
+              .           .          .               .       â
+              .           .          .               .   (the middleâend and backend)
+              .           .          .               .       â
+              .           .    <âââââââââââââââââââââââââââââ end of toplev::main
+              .           .    â RELEASE MUTEX       .
+              .           .    â     .               .
+              .           .    â Convert assembler to DSO
+              .           .    â     .               .
+              .           .    â Load DSO            .
+   <âââââââââââââââââââââââââââ      .               .
+   â          .           .          .               .
+   Get (void*).           .          .               .
+   â          .           .          .               .
+   â Call it  .           .          .               .
+   âââââââââââââââ>       .          .               .
+              .    â      .          .               .
+              .    â      .          .               .
+   <âââââââââââââââ       .          .               .
+   â          .           .          .               .
+   â          .           .          .               .
+etc
-- 
1.8.5.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]