llvm2py.ir.block module¶
- class Block(value: Value, instrs: list[Ret | Br | Switch | IndirectBr | Invoke | Resume | CallBr | CatchSwitch | CatchRet | CleanupPad | Unreacheble | UnaryOp | BinOp | ExtractElement | InsertElement | ShuffleVector | ExtractValue | InsertValue | Alloca | Load | Store | Fence | CmpXchg | AtomicRmw | GetElementPtr | Conversion | ICmp | FCmp | Phi | Select | Freeze | Call | VaArg | LandingPad | CatchPad], pred_blocks: list[str])¶
Bases:
NamedTuple
Basic block class.
- Parameters:
value (Value) – The block as value.
instrs (list[Instruction]) – A list of block instructions.
pred_blocks (list[str]) – A list of predecessor block names.
- has_no_calls()¶
Returns true if the block does not contain calls to other functions.
Intrinsics are not considered functions.