qat.experimental.dialect.common.region module

Block and region surgery helpers.

detach_non_terminator_ops(block)

Detach and return every operation of block except its terminator.

The block’s last operation is assumed to be its terminator and is left in place. An empty or terminator-only block yields an empty list.

Return type:

list[Operation]

install_single_block(region, ops)

Replace every block of region with one block holding ops.

Return type:

None