restore SUPEROPT_GC, SUPEROPT_VM
This commit is contained in:
parent
a13185bb34
commit
2f391e5679
14
py/py.mk
14
py/py.mk
@ -292,11 +292,25 @@ $(BUILD)/shared/libc/string0.o: CFLAGS += $(CFLAGS_BUILTIN)
|
|||||||
# that the function preludes are of a minimal and predictable form.
|
# that the function preludes are of a minimal and predictable form.
|
||||||
$(PY_BUILD)/nlr%.o: CFLAGS += -Os
|
$(PY_BUILD)/nlr%.o: CFLAGS += -Os
|
||||||
|
|
||||||
|
# CIRCUITPY: separate SUPEROPT for gc.o and vm.o
|
||||||
# optimising gc for speed; 5ms down to 4ms on pybv2
|
# optimising gc for speed; 5ms down to 4ms on pybv2
|
||||||
|
ifndef SUPEROPT_GC
|
||||||
|
SUPEROPT_GC = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(SUPEROPT_GC),1)
|
||||||
$(PY_BUILD)/gc.o: CFLAGS += $(CSUPEROPT)
|
$(PY_BUILD)/gc.o: CFLAGS += $(CSUPEROPT)
|
||||||
|
endif
|
||||||
|
|
||||||
# optimising vm for speed, adds only a small amount to code size but makes a huge difference to speed (20% faster)
|
# optimising vm for speed, adds only a small amount to code size but makes a huge difference to speed (20% faster)
|
||||||
|
ifndef SUPEROPT_VM
|
||||||
|
SUPEROPT_VM = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(SUPEROPT_VM),1)
|
||||||
$(PY_BUILD)/vm.o: CFLAGS += $(CSUPEROPT)
|
$(PY_BUILD)/vm.o: CFLAGS += $(CSUPEROPT)
|
||||||
|
endif
|
||||||
|
|
||||||
# Optimizing vm.o for modern deeply pipelined CPUs with branch predictors
|
# Optimizing vm.o for modern deeply pipelined CPUs with branch predictors
|
||||||
# may require disabling tail jump optimization. This will make sure that
|
# may require disabling tail jump optimization. This will make sure that
|
||||||
# each opcode has its own dispatching jump which will improve branch
|
# each opcode has its own dispatching jump which will improve branch
|
||||||
|
Loading…
Reference in New Issue
Block a user