#include "buffer.h"
#include "blockinput.h"
-#define DEFAULT_SPEED 2 /* See comp-speed var. */
-
#define COMP_DEBUG 1
/* C symbols emited for the load relocation mechanism. */
{
EMACS_INT slot_n = XFIXNUM (FUNCALL1 (comp-mvar-slot, mvar));
gcc_jit_lvalue **frame =
- (FUNCALL1 (comp-mvar-ref, mvar) || comp_speed < 2)
+ (FUNCALL1 (comp-mvar-ref, mvar) || SPEED < 2)
? comp.frame : comp.f_frame;
return frame[slot_n];
}
- Allow gcc to trigger other optimizations that are prevented by memory
referencing.
*/
- if (comp_speed >= 2)
+ if (SPEED >= 2)
{
comp.f_frame = SAFE_ALLOCA (frame_size * sizeof (*comp.f_frame));
for (unsigned i = 0; i < frame_size; ++i)
gcc_jit_context_set_int_option (comp.ctxt,
GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL,
- comp_speed);
+ SPEED);
/* Gcc doesn't like being interrupted at all. */
block_input ();
sigset_t oldset;
void
syms_of_comp (void)
{
+ /* Compiler control customize. */
+ DEFSYM (Qcomp_speed, "comp-speed");
/* Limple instruction set. */
DEFSYM (Qcomment, "comment");
DEFSYM (Qjump, "jump");
staticpro (&comp.emitter_dispatcher);
comp.emitter_dispatcher = Qnil;
- DEFVAR_INT ("comp-speed", comp_speed,
- doc: /* From 0 to 3. */);
DEFVAR_LISP ("comp-ctxt", Vcomp_ctxt,
doc: /*
The compiler context. */);
Vcomp_ctxt = Qnil;
- comp_speed = DEFAULT_SPEED;
/* Load mechanism. */
staticpro (&Vnative_elisp_refs_hash);