github/workflows/pycopy-test: Upgrade Pycopy to 3.6.1.
[ScratchABlock.git] / script_i_prepare.py
blob638a0cb613882566f5e52afdff01107555f3b373
1 from xform import *
2 from dataflow import *
4 def apply(cfg):
5 # Various algos below don't work with no explicit entry in CFG
6 cfg_preheader(cfg)
8 # Also don't work with >1 entries
9 # remove_unreachable_entries(cfg)
11 number_postorder(cfg)
12 remove_unreachable_nodes(cfg)
14 # Also don't work unless there's a single exit
15 cfg_single_exit(cfg)
16 number_postorder_from_exit(cfg)
17 number_postorder(cfg)
18 cfg_infloops_exit(cfg)
20 foreach_inst(cfg, sub_const_to_add)