Get the latest tech news
Writing an IR from Scratch and survive to write a post
The following post will talk about the design of the first version of the Intermediate Representation of Kunai, the design decisions and how it was implemented.
Although the idea was good, my knowledge of the IRs was limited, and mostly based on using tools like Triton that gave me access to LLVM-IR code, or analyzing binaries using Ghidra and observing the generated P-code. An example of Java bytecodeA comparison between a stack and register bytecodeIn general, my observation from the different books and projects is that an IR has a container for storing functions/methods from the programs. For calculating these chains we will need three parameters, one IRGraph containing the method to analyze and reachingdefinition_t a reaching definition analysis output from the previous point.
Or read this on Hacker News