Commit Graph

105 Commits

Author SHA1 Message Date
Ayke van Laethem fd6dda5e4f main: run the compiler from any path 2018-09-24 12:25:33 +02:00
Ayke van Laethem 2938437efc compiler: make string data unnamed addresses
This ensures LLVM can merge identical strings, and thus reduces code
size in some cases.
2018-09-23 03:03:40 +02:00
Ayke van Laethem 7cea40bcb5 compiler: small cleanup in call handling code 2018-09-23 03:01:10 +02:00
Ayke van Laethem fdfa810060 compiler: expand small structs
Use fields of small structs (3 or less fields when flattened
recursively) directly as parameter values.

Advantages:
  * Code size is slightly reduced, both on unix and nrf.
  * AVR can finally deal with struct parameters - at least the small
    ones. examples/test now compiles. A real fix for struct parameters
    should go into upstream LLVM, but this is a nice win.

fixes #20
2018-09-23 02:39:05 +02:00
Ayke van Laethem b2cbfa78ca compiler: refactor compiler into separate package 2018-09-22 20:32:28 +02:00