On Tuesday, 16 February 2016 at 12:15:03 UTC, Ola Fosheim Grøstad wrote:
Common wisdom is to compile to a high level IR first. In the case of C++ it has worked out ok for clang. That does not mean that there are no benefits to using a high level IR.

Let me expand on this:

1. it makes the compiler easier to maintain and debug as the compiler becomes more modular with clear separation

2. it makes it possible to verify @safe (hopefully)

3. it makes it easier to use multiple backends

4. it can make it easier to exploit multithreading

5. you can have separate compilation that retains more type information for whole program linkage or optimization

6. It makes it much easier to get people to work on the compiler as you only need to understand the IR when implementing features, i.e. static analysis.

Reply via email to