EDDIC 0.8.1 : do while loop and better optimization

Only three days after the 0.8 version, I finished the 0.8.1 version.

It's a minor version, so there is no big changes to the language. However, I added support for the do while loop in the source code.

Another change is that assignment is now returning a value. That allows you to make some code like this one:

int a = b = 5;
b = (a = 4) + 1;

This new version includes also some new changes for the optimization engine. I implemented constant propagation and copy propagation for offset assignment. For example:

a(8) = 4;
b = a(8);

becomes:

a(8) = 4;
b = 4;

And the last change is that the concatenations that are detected to be constant after some optimization are made at compile-time by the optimization engine. This simplify a lot the generated code for source file with a lot of concatenations.

The next version (the 0.9) will introduce floating point operations and parameter passing with registers (probably only in 64 bit). It's also possible that I will try to implement a first version of global optimization.

Download

You can find the compiler sources on the Github repository: https://github.com/wichtounet/eddic

The exact version I refer to is the v0.8.1 available in the github tags or directly as the release branch.

Related articles

  • EDDI Compiler 1.0 - Structures and Global Optimizations
  • EDDI Compiler 1.0.3 - Inlining and register allocation
  • EDDIC 0.9.1 - Enhanced floating point support
  • EDDI Compiler 1.1.3 - Templates
  • eddic 1.2.3 - Better data-flow analysis
  • EDDI Compiler 1.0.2 – Better pointer support and Dead-Code Elimination
  • Comments

    Comments powered by Disqus