diff libinterp/interp-core/pt-jit.cc @ 16877:5482cd26311a

Rename enable_jit_compiler to jit_enable, enable_jit_debugging to debug_jit. Rename command line option --debug-jit to --jit-debug. * doc/interpreter/basics.txi: Rename command line option --jit-debug to --debug-jit. * libinterp/interp-core/pt-jit.cc(Fenable_jit_debugging, Fenable_jit_compiler): Rename functions and all references to new names. *libinterp/octave.cc(octave_process_command_line): Update references to Fenable_jit_debugging. Update long_opts struct and usage_string to refer to debug-jit rather than jit-debug.
author Rik <rik@octave.org>
date Sun, 30 Jun 2013 15:16:06 -0700
parents e2de3c8882be
children
line wrap: on
line diff
--- a/libinterp/interp-core/pt-jit.cc	Sun Jun 30 14:19:02 2013 -0700
+++ b/libinterp/interp-core/pt-jit.cc	Sun Jun 30 15:16:06 2013 -0700
@@ -40,9 +40,9 @@
 
 #ifdef HAVE_LLVM
 
-static bool Venable_jit_debugging = false;
-
-static bool Venable_jit_compiler = true;
+static bool Vdebug_jit = false;
+
+static bool Vjit_enable = true;
 
 #include <llvm/Analysis/CallGraph.h>
 #include <llvm/Analysis/Passes.h>
@@ -1944,7 +1944,7 @@
   // Ideally, we should only disable JIT if there is a breakpoint in the code we
   // are about to run. However, we can't figure this out in O(1) time, so we
   // conservatively check for the existence of any breakpoints.
-  return Venable_jit_compiler && ! bp_table::have_breakpoints ()
+  return Vjit_enable && ! bp_table::have_breakpoints ()
     && ! Vdebug_on_interrupt && ! Vdebug_on_error;
 }
 
@@ -1965,13 +1965,13 @@
 void
 tree_jit::optimize (llvm::Function *fn)
 {
-  if (Venable_jit_debugging)
+  if (Vdebug_jit)
     llvm::verifyModule (*module);
 
   module_pass_manager->run (*module);
   pass_manager->run (*fn);
 
-  if (Venable_jit_debugging)
+  if (Vdebug_jit)
     {
       std::string error;
       llvm::raw_fd_ostream fout ("test.bc", error,
@@ -2000,7 +2000,7 @@
                        conv.get_variable_map ());
       infer.infer ();
 
-      if (Venable_jit_debugging)
+      if (Vdebug_jit)
         {
           jit_block_list& blocks = infer.get_blocks ();
           blocks.label ();
@@ -2021,7 +2021,7 @@
                                          factory.constants (), fcn,
                                          argument_types);
 
-      if (Venable_jit_debugging)
+      if (Vdebug_jit)
         {
           std::cout << "-------------------- raw function ";
           std::cout << "--------------------\n";
@@ -2069,7 +2069,7 @@
       llvm::Function *llvm_function = wrapper.to_llvm ();
       tjit.optimize (llvm_function);
 
-      if (Venable_jit_debugging)
+      if (Vdebug_jit)
         {
           std::cout << "-------------------- optimized and wrapped ";
           std::cout << "--------------------\n";
@@ -2085,7 +2085,7 @@
     {
       argument_types.clear ();
 
-      if (Venable_jit_debugging)
+      if (Vdebug_jit)
         {
           if (e.known ())
             std::cout << "jit fail: " << e.what () << std::endl;
@@ -2223,7 +2223,7 @@
 
       infer.infer ();
 
-      if (Venable_jit_debugging)
+      if (Vdebug_jit)
         {
           jit_block_list& blocks = infer.get_blocks ();
           blocks.label ();
@@ -2242,7 +2242,7 @@
     }
   catch (const jit_fail_exception& e)
     {
-      if (Venable_jit_debugging)
+      if (Vdebug_jit)
         {
           if (e.known ())
             std::cout << "jit fail: " << e.what () << std::endl;
@@ -2251,7 +2251,7 @@
 
   if (llvm_function)
     {
-      if (Venable_jit_debugging)
+      if (Vdebug_jit)
         {
           std::cout << "-------------------- llvm ir --------------------";
           std::cout << *llvm_function << std::endl;
@@ -2260,7 +2260,7 @@
 
       tjit.optimize (llvm_function);
 
-      if (Venable_jit_debugging)
+      if (Vdebug_jit)
         {
           std::cout << "-------------------- optimized llvm ir "
                     << "--------------------\n";
@@ -2282,45 +2282,45 @@
 
 #endif
 
-DEFUN (enable_jit_debugging, args, nargout,
+DEFUN (debug_jit, args, nargout,
   "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {@var{val} =} enable_jit_debugging ()\n\
-@deftypefnx {Built-in Function} {@var{old_val} =} enable_jit_debugging (@var{new_val})\n\
-@deftypefnx {Built-in Function} {} enable_jit_debugging (@var{new_val}, \"local\")\n\
+@deftypefn  {Built-in Function} {@var{val} =} debug_jit ()\n\
+@deftypefnx {Built-in Function} {@var{old_val} =} debug_jit (@var{new_val})\n\
+@deftypefnx {Built-in Function} {} debug_jit (@var{new_val}, \"local\")\n\
 Query or set the internal variable that determines whether\n\
 debugging/tracing is enabled for Octave's JIT compiler.\n\
 \n\
 When called from inside a function with the \"local\" option, the variable is\n\
 changed locally for the function and any subroutines it calls.  The original\n\
 variable value is restored when exiting the function.\n\
-@seealso{enable_jit_compiler}\n\
+@seealso{jit_enable}\n\
 @end deftypefn")
 {
 #if defined (HAVE_LLVM)
-  return SET_INTERNAL_VARIABLE (enable_jit_debugging);
+  return SET_INTERNAL_VARIABLE (debug_jit);
 #else
-  warning ("enable_jit_debugging: JIT compiling not available in this version of Octave");
+  warning ("debug_jit: JIT compiling not available in this version of Octave");
   return octave_value ();
 #endif
 }
 
-DEFUN (enable_jit_compiler, args, nargout,
+DEFUN (jit_enable, args, nargout,
   "-*- texinfo -*-\n\
-@deftypefn  {Built-in Function} {@var{val} =} enable_jit_compiler ()\n\
-@deftypefnx {Built-in Function} {@var{old_val} =} enable_jit_compiler (@var{new_val})\n\
-@deftypefnx {Built-in Function} {} enable_jit_compiler (@var{new_val}, \"local\")\n\
+@deftypefn  {Built-in Function} {@var{val} =} jit_enable ()\n\
+@deftypefnx {Built-in Function} {@var{old_val} =} jit_enable (@var{new_val})\n\
+@deftypefnx {Built-in Function} {} jit_enable (@var{new_val}, \"local\")\n\
 Query or set the internal variable that enables Octave's JIT compiler.\n\
 \n\
 When called from inside a function with the \"local\" option, the variable is\n\
 changed locally for the function and any subroutines it calls.  The original\n\
 variable value is restored when exiting the function.\n\
-@seealso{enable_jit_debugging}\n\
+@seealso{debug_jit}\n\
 @end deftypefn")
 {
 #if defined (HAVE_LLVM)
-  return SET_INTERNAL_VARIABLE (enable_jit_compiler);
+  return SET_INTERNAL_VARIABLE (jit_enable);
 #else
-  warning ("enable_jit_compiler: JIT compiling not available in this version of Octave");
+  warning ("jit_enable: JIT compiling not available in this version of Octave");
   return octave_value ();
 #endif
 }