[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] libjit ChangeLog doc/libjit.texi
From: |
Aleksey Demakov |
Subject: |
[dotgnu-pnet-commits] libjit ChangeLog doc/libjit.texi |
Date: |
Thu, 20 Dec 2007 17:31:51 +0000 |
CVSROOT: /sources/dotgnu-pnet
Module name: libjit
Changes by: Aleksey Demakov <avd> 07/12/20 17:31:51
Modified files:
. : ChangeLog
doc : libjit.texi
Log message:
update tutorial wrt recomplation
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libjit/ChangeLog?cvsroot=dotgnu-pnet&r1=1.326&r2=1.327
http://cvs.savannah.gnu.org/viewcvs/libjit/doc/libjit.texi?cvsroot=dotgnu-pnet&r1=1.11&r2=1.12
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/ChangeLog,v
retrieving revision 1.326
retrieving revision 1.327
diff -u -b -r1.326 -r1.327
--- ChangeLog 20 Dec 2007 13:47:22 -0000 1.326
+++ ChangeLog 20 Dec 2007 17:31:50 -0000 1.327
@@ -10,6 +10,8 @@
* tutorial/t3.c, tutorial/t4.cpp: recompile manually
instead of using removed recompile functions.
+ * doc/libjit.texi: update tutorial.
+
2007-12-16 Klaus Treichel <address@hidden>
* configure.in: Add support for multi os archs (like x86_64). Put the
Index: doc/libjit.texi
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/doc/libjit.texi,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- doc/libjit.texi 6 Oct 2004 05:43:15 -0000 1.11
+++ doc/libjit.texi 20 Dec 2007 17:31:50 -0000 1.12
@@ -599,6 +599,9 @@
@code{jit_function_compile} and then jump to the newly compiled code.
Upon the second and subsequent calls to the function, @code{libjit}
will bypass the on-demand compiler and call the compiled code directly.
+Note that in case of on-demand compilation @code{libjit} automatically
+locks and unlocks the corresponding context with
address@hidden and @code{jit_context_build_end} calls.
Sometimes you may wish to force a commonly used function to
be recompiled, so that you can apply additional optimization.
@@ -613,11 +616,18 @@
jit_function_set_on_demand_compiler(function, compile_mul_add);
@end example
-Then, you force the function to be recompiled with a call to
address@hidden:
+Once the function is compiled (either on-demand or up-front) its
+intermediate representation built by @code{libjit} is discarded.
+To force the function to be recompiled you need to build it again
+and call @code{jit_function_compile} after that. As always when
+the function is built and compiled manually it is necessary
+to take care of context locking:
@example
-jit_function_recompile(function);
+jit_context_build_start(context);
+jit_function_get_on_demand_compiler(function)(function);
+jit_function_compile(function);
+jit_context_build_end(context);
@end example
After this, any existing references to the function will be redirected
@@ -677,9 +687,10 @@
set_recompilable();
@}
+ virtual void build();
+
protected:
virtual jit_type_t create_signature();
- virtual void build();
@};
@end example
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] libjit ChangeLog doc/libjit.texi,
Aleksey Demakov <=