Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder if one solution would be have tighter integration between the layers, so the backend could ask for some IR to be generated? Basically starting from the program entrypoints. This way the frontend wouldn't need to generate all the possible code up-front.

Mind you, I've never written a compiler after that Uni course and touched LLVM IR a long time ago



That is how MLIR works. Basically you have multiple levels of IR, you can optimize each level until you get to the last level.

It also has the advantage of being able to parallelize passes




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: