When any compiler like GCC compiles a C Program it generates intermediate code. Just like we can get Assembly code by applying -s option to any .c file, similarly I want to get Register-Transfer-Language (RTL) for C and JAVA file . How to get it ?
The Register Transfer Language is the symbolic representation of notations used to specify the sequence of micro-operations. In a computer system, data transfer takes place between processor registers and memory and between processor registers and input-output systems.
In digital circuit design, register-transfer level (RTL) is a design abstraction which models a synchronous digital circuit in terms of the flow of digital signals (data) between hardware registers, and the logical operations performed on those signals.
In computer science, register transfer language (RTL) is a kind of intermediate representation (IR) that is very close to assembly language, such as that which is used in a compiler. It is used to describe data flow at the register-transfer level of an architecture.
The three adress code is called gimple, see e.g. https://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html but this seems more frontend-backend communication, it can be dumped using
gcc -fdump-tree-gimple <file>
See http://www.cse.iitb.ac.in/~uday/courses/cs324-05/gccProjects/node4.html
from some more IR related dumping options from HLL to deep. Probably you want option 4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With