Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on MICROPY_OPT_COMPUTED_GOTO for 5x CPU-bound speedup #1934

Merged
merged 5 commits into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor

# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 25
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
else
CFLAGS_INLINE_LIMIT = 55
CFLAGS_INLINE_LIMIT = 35
endif
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
else
CFLAGS_INLINE_LIMIT = 55
CFLAGS_INLINE_LIMIT = 35
endif

# Include these Python libraries in firmware.
Expand Down
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/meowmeow/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
4 changes: 3 additions & 1 deletion ports/atmel-samd/boards/pewpew10/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ CIRCUITPY_SMALL_BUILD = 1

# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 40
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
else
CFLAGS_INLINE_LIMIT = 35
endif
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CIRCUITPY_SMALL_BUILD = 1
CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21

CFLAGS_INLINE_LIMIT = 25
CFLAGS_INLINE_LIMIT = 23

# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
Expand Down
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21

ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
endif
1 change: 1 addition & 0 deletions py/circuitpy_mpconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
#define MICROPY_KBD_EXCEPTION (1)
#define MICROPY_MEM_STATS (0)
#define MICROPY_NONSTANDARD_TYPECODES (0)
#define MICROPY_OPT_COMPUTED_GOTO (1)
#define MICROPY_PERSISTENT_CODE_LOAD (1)

#define MICROPY_PY_ARRAY (1)
Expand Down
4 changes: 2 additions & 2 deletions py/vmentrytable.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* THE SOFTWARE.
*/

#if __clang__
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winitializer-overrides"
#endif // __clang__
Expand Down Expand Up @@ -113,6 +113,6 @@ static const void *const entry_table[256] = {
[MP_BC_BINARY_OP_MULTI ... MP_BC_BINARY_OP_MULTI + MP_BINARY_OP_NUM_BYTECODE - 1] = &&entry_MP_BC_BINARY_OP_MULTI,
};

#if __clang__
#ifdef __clang__
#pragma clang diagnostic pop
#endif // __clang__