TODO
A statement, in GCC’s Gimple representation.
The __str__ method is implemented using GCC’s own pretty-printer for gimple, so e.g.:
str(stmt)
might return:
'D.3259 = (long unsigned int) i;'
Source code location of this statement, as a gcc.Location (or None)
The lexical block holding this statement, as a gcc.Tree
The type of the main expression computed by this statement, as a gcc.Tree (which might be gcc.VoidType)
A string representation of this statement, like str(), but without including any internal UIDs.
This is intended for use in selftests that compare output against some expected value, to avoid embedding values that change into the expected output.
For example, given an assignment to a temporary, the str(stmt) for the gcc.GimpleAssign might be:
'D.3259 = (long unsigned int) i;'
where the UID “3259” is liable to change from compile to compile, whereas the stmt.str_no_uid has value:
'D.xxxx = (long unsigned int) i;'
which won’t arbitrarily change each time.
Subclass of gcc.Gimple: an assignment of an expression to an l-value
Left-hand-side of the assignment, as a gcc.Tree
The operands on the right-hand-side of the expression, as a list of gcc.Tree instances
The kind of the expression, as an gcc.Tree subclass (the type itself, not an instance)
Subclass of gcc.Gimple: an invocation of a function, assigning the result to an l-value
Left-hand-side of the assignment, as a gcc.Tree
The operands on the right-hand-side of the expression, as a list of gcc.Tree instances
The function being called, as a gcc.Tree
The declaration of the function being called (if any), as a gcc.Tree
The arguments for the call, as a list of gcc.Tree
Subclass of gcc.Gimple: a “return” statement, signifying the end of a gcc.BasicBlock
The return value, as a gcc.Tree
Subclass of gcc.Gimple: an “if” statement, signifying the end of a gcc.BasicBlock
Left-hand-side of the assignment, as a gcc.Tree
The operands on the right-hand-side of the expression, as a list of gcc.Tree instances
The kind of the expression, as an gcc.Tree subclass (the type itself, not an instance)
Subclass of gcc.Gimple used in the SSA passes: a “PHI” or “phoney” function, for merging the various possible values a variable can have based on the edge that we entered this gcc.BasicBlock on.
- lhs¶
Left-hand-side of the assignment, as a gcc.Tree (generally a gcc.SsaName, I believe)