next up previous
Next: cfg Up: Predefined Phases Previous: c-code

dismantle

The dismantle phase ``dismantles'' or ``lowers'' the C code to a level much more like Muchnick's MIR. To get the best idea of what dismantle actually does, run it on a little C program and read the output from the c-code phase; we'll take a look at an example shortly. Basically, the code is simplified as much as possible without becoming machine-dependent. The only side-effect a dismantled expression will have is a single assignment. All array accesses are changed to pointer accesses. All control flow statements and expressions are reduced to sequences of if and goto. Note that &&, || and ?: are control flow operators and will not appear in dismantled code.



Calvin Lin
2002-01-31