December 2015
Beginner to intermediate
166 pages
3h 8m
English
Frame lowering involves emitting function prologue and epilogue. The prologue happens at the beginning of a function. It sets up the stack frame of the called function. The epilogue happens last in a function, it restores the stack frame of the calling (parent) function.
The "stack" serves several purposes in the execution of a program, as follows:
Thus there are 2 main functions that need to be defined when implementing frame lowering – emitPrologue() and emitEpilogue().
The emitPrologue() function can be defined as follows:
void TOYFrameLowering::emitPrologue(MachineFunction ...
Read now
Unlock full access