Skip to content

Commit 2f391e5

Browse files
committed
restore SUPEROPT_GC, SUPEROPT_VM
1 parent a13185b commit 2f391e5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

py/py.mk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,25 @@ $(BUILD)/shared/libc/string0.o: CFLAGS += $(CFLAGS_BUILTIN)
292292
# that the function preludes are of a minimal and predictable form.
293293
$(PY_BUILD)/nlr%.o: CFLAGS += -Os
294294

295+
# CIRCUITPY: separate SUPEROPT for gc.o and vm.o
295296
# optimising gc for speed; 5ms down to 4ms on pybv2
297+
ifndef SUPEROPT_GC
298+
SUPEROPT_GC = 1
299+
endif
300+
301+
ifeq ($(SUPEROPT_GC),1)
296302
$(PY_BUILD)/gc.o: CFLAGS += $(CSUPEROPT)
303+
endif
297304

298305
# optimising vm for speed, adds only a small amount to code size but makes a huge difference to speed (20% faster)
306+
ifndef SUPEROPT_VM
307+
SUPEROPT_VM = 1
308+
endif
309+
310+
ifeq ($(SUPEROPT_VM),1)
299311
$(PY_BUILD)/vm.o: CFLAGS += $(CSUPEROPT)
312+
endif
313+
300314
# Optimizing vm.o for modern deeply pipelined CPUs with branch predictors
301315
# may require disabling tail jump optimization. This will make sure that
302316
# each opcode has its own dispatching jump which will improve branch

0 commit comments

Comments
 (0)