diff options
| author | Damien George <damien.p.george@gmail.com> | 2015-03-14 13:11:35 +0000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2015-03-14 13:11:35 +0000 |
| commit | 42e0c593084784cb0b630d99b8361bc88abadb78 (patch) | |
| tree | 77fbdc4ec51705f0e29e07b050b520a0e27f13f2 /py/mpconfig.h | |
| parent | a77ffe66b23fe0f367af3dd64ae94b56fbf947d3 (diff) | |
py: Add MICROPY_COMP_{DOUBLE,TRIPLE}_TUPLE_ASSIGN config options.
These allow to fine-tune the compiler to select whether it optimises
tuple assignments of the form a, b = c, d and a, b, c = d, e, f.
Sensible defaults are provided.
Diffstat (limited to 'py/mpconfig.h')
| -rw-r--r-- | py/mpconfig.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index bfa412167..aac3ade08 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -175,6 +175,18 @@ #define MICROPY_COMP_CONST (1) #endif +// Whether to enable optimisation of: a, b = c, d +// Costs 124 bytes (Thumb2) +#ifndef MICROPY_COMP_DOUBLE_TUPLE_ASSIGN +#define MICROPY_COMP_DOUBLE_TUPLE_ASSIGN (1) +#endif + +// Whether to enable optimisation of: a, b, c = d, e, f +// Cost 156 bytes (Thumb2) +#ifndef MICROPY_COMP_TRIPLE_TUPLE_ASSIGN +#define MICROPY_COMP_TRIPLE_TUPLE_ASSIGN (0) +#endif + /*****************************************************************************/ /* Internal debugging stuff */ |
