I also read somewhere, it’s fine to add as many IRs in your own compiler as you want, unless they are helping you. The point was mainly made as an answer to: Does using more IRs in compiler slows it down?
It doesn’t have to slow it down, but it can slow it down. Each transformation from one IR to the next causes overhead. But that new IR may make the analysis/transformation you want to do on it easier or more efficient. It’s a tradeoff. Some compiler tools, such as nanopass, encourage you to do lots of IR transformations, but I haven’t used them in practice.
I rewrote my shell’s lexer over weekend, hopefully can complete rewriting it’s parser and engine parts this week :)
I also read somewhere, it’s fine to add as many IRs in your own compiler as you want, unless they are helping you. The point was mainly made as an answer to: Does using more IRs in compiler slows it down?
It doesn’t have to slow it down, but it can slow it down. Each transformation from one IR to the next causes overhead. But that new IR may make the analysis/transformation you want to do on it easier or more efficient. It’s a tradeoff. Some compiler tools, such as nanopass, encourage you to do lots of IR transformations, but I haven’t used them in practice.
Seems to be a subscriber-only link
Oops missed that, apologies on my part for that. It seems it will open up on 20th :sweat_smile: