Plan for O(1) PHI argument look up

Kazu Hirata is planning to implement O(1) PHI argument look up in the following order:

Stop assigning to PHI_ARG_EDGE

tree-cfg.c:tree_split_edge

Add a CFG hook so that we can do something upon edge creation

cfghooks.h:cfghooks

cfghooks.c:execute_on_new_edge (edge e)

cfgrtl.c:rtl_cfg_hooks

cfgrtl.c:cfg_layout_rtl_cfg_hooks

tree-cfg.c:tree_cfg_hooks

cfg.c:unchecked_make_edge, redirect_edge_succ, redirect_edge_pred

Resize PHI nodes upon edge creation

tree-phinodes.c:reserve_phi_args_for_new_edge (basic_block bb)

tree-cfg.c:tree_execute_on_new_edge (edge e)

tree-cfg.c:tree_cfg_hooks

tree-phinodes.c:add_phi_arg

O(1) discovery of edge E in E->dest->preds

basic-block.h:edge_def

cfg.c:remove_edge, redirect_succ

cfg.c:unchecked_make_edge, redirect_edge_succ.

tree-cfg.c:verify_flow_info

Line up PHI arguments with edges

tree-phinodes.c:create_phi_node

tree-phinodes.c:reserve_phi_args_for_new_edge (basic_block bb)

tree-phinodes.c:add_phi_arg (tree phi, tree def, edge e)

tree-cfg.c:verify_flow_info

Speed up phi_arg_from_edge

tree-flow-inline.h:phi_arg_from_edge (tree phi, edge e)

Remove edge e in tree_phi_node

tree.h:PHI_ARG_EDGE(NODE, I)

tree-phinodes.c:everywhere

tree.h:tree_phi_node

Speed up ssa_remove_edge

tree-ssa.c:ssa_remove_edge

tree-phinodes.c:remove_phi_arg

Clean up uses of PHI_ARG_EDGE

Everywhere where PHI_ARG_EDGE is used

Clean up uses of phi_arg_from_edge

Everywhere where phi_arg_from_edge is used

Clean up add_phi_arg

tree-phinodes.c:add_phi_arg

Everywhere add_phi_arg is used

None: PhiLookUp (last edited 2008-01-10 19:38:55 by localhost)