emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp 89b6f56 09/12: * src/comp.c (Fcomp__compile_ctxt_to_


From: Andrea Corallo
Subject: feature/native-comp 89b6f56 09/12: * src/comp.c (Fcomp__compile_ctxt_to_file): Confine gcc optim level in [0, 3].
Date: Sun, 21 Jun 2020 18:37:17 -0400 (EDT)

branch: feature/native-comp
commit 89b6f56de011fa45934800a60bf631fc99ef2a4c
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    * src/comp.c (Fcomp__compile_ctxt_to_file): Confine gcc optim level in [0, 
3].
---
 src/comp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/comp.c b/src/comp.c
index 82a092a..7547a40 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4032,7 +4032,8 @@ DEFUN ("comp--compile-ctxt-to-file", 
Fcomp__compile_ctxt_to_file,
 
   gcc_jit_context_set_int_option (comp.ctxt,
                                  GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL,
-                                 COMP_SPEED);
+                                 COMP_SPEED < 0 ? 0
+                                 : (COMP_SPEED > 3 ? 3 : COMP_SPEED));
   comp.d_default_idx =
     CALL1I (comp-data-container-idx, CALL1I (comp-ctxt-d-default, Vcomp_ctxt));
   comp.d_impure_idx =



reply via email to

[Prev in Thread] Current Thread [Next in Thread]