IR-code¶
Front ends generate this IR-code. Backends transform it into machine code.
Top level structure¶
The IR-code is implemented in the ir package.
-
class
ppci.ir.
Module
(name)¶ Container unit for variables and functions.
-
class
ppci.ir.
Function
(name, module=None)¶ Represents a function.
-
class
ppci.ir.
Block
(name, function=None)¶ Uninterrupted sequence of instructions with a label at the start.
Statements¶
A block contains a sequence of statements.
-
class
ppci.ir.
Load
(address, name, ty, volatile=False)¶ Load a value from memory
-
class
ppci.ir.
Store
(value, address, volatile=False)¶ Store a value into memory
-
class
ppci.ir.
Const
(value, name, ty)¶ Represents a constant value
-
class
ppci.ir.
Binop
(a, operation, b, name, ty, loc=None)¶ Generic binary operation
-
class
ppci.ir.
Call
(function_name, arguments, name, ty, loc=None)¶ Call a function with some arguments
-
class
ppci.ir.
Jump
(target)¶ Jump statement to another block within the same function
-
class
ppci.ir.
CJump
(a, cond, b, lab_yes, lab_no)¶ Conditional jump to true or false labels.