Stay organized with collections Save and categorize content based on your preferences.

A basic block.

instructions A list of PrimOp, PopOp, and FunctionCallOp instructions to execute in order. Control transfer instructions (that do not return) are not permitted in this list.
terminator A single BranchOp, GotoOp, PushGotoOp or IndirectGotoOp, indicating how to transfer control out of this basic block.
name An object serving as the name of this Block, for display.

label_str A string suitable for referring to this Block in printed output.



View source

Assigns the body instructions and the terminator at once.

This is a convenience method, to set a Block's program content in one invocation instead of having to assign the instructions and the terminator fields separately.

instructions A non-empty Python list of Op objects. The last one must be a BranchOp, GotoOp, PushGotoOp, or IndirectGotoOp, and becomes the terminator. The others, if any, must be PrimOp, PopOp, or FunctionCallOp, and become the instructions, in order.