Validation

Verify an IR-module for consistency.

This is a very useful module since it allows to isolate bugs in the compiler itself.

class ppci.irutils.verify.Verifier

Checks an ir module for correctness

block_dominates(one: ppci.ir.Block, another: ppci.ir.Block)

Check if this block dominates other block

instruction_dominates(one, another)

Checks if one instruction dominates another instruction

verify(module)

Verifies a module for some sanity

verify_block(block)

Verify block for correctness

verify_block_termination(block)

Verify that the block is terminated correctly

verify_function(function)

Verify all blocks in the function

verify_instruction(instruction, block)

Verify that instruction belongs to block and that all uses are preceeded by defs

verify_subroutine_call(instruction)

Check some properties of a function call

ppci.irutils.verify.verify_module(module: ppci.ir.Module)

Check if the module is properly constructed

Parameters:module – The module to verify.