File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments