> >> 
> >> So please re-check with the above execute_fixup_cfg removed
> >> (your simple patch doesn't handle direct recursion optimistically).
> >
> >Ah, you are right. I will add it - that is easy enoug to check.
> 
> But then you need to do the fixup or remember the direct recursion sites and 
> fix them up manually.

We do all fixups needed:
  PUSH_INSERT_PASSES_WITHIN (pass_build_ssa_passes)
      NEXT_PASS (pass_fixup_cfg);
      NEXT_PASS (pass_init_datastructures);
      NEXT_PASS (pass_build_ssa);
      NEXT_PASS (pass_ubsan);
      NEXT_PASS (pass_early_warn_uninitialized);
  POP_INSERT_PASSES ()

  NEXT_PASS (pass_chkp_instrumentation_passes);
  PUSH_INSERT_PASSES_WITHIN (pass_chkp_instrumentation_passes)
      NEXT_PASS (pass_fixup_cfg);
      NEXT_PASS (pass_chkp);
      NEXT_PASS (pass_rebuild_cgraph_edges);
  POP_INSERT_PASSES ()

  NEXT_PASS (pass_local_optimization_passes);
  PUSH_INSERT_PASSES_WITHIN (pass_local_optimization_passes)
      NEXT_PASS (pass_fixup_cfg);

for recursive calls and calls going backwards in the topological order the
fixup will happen as first thing of pass_local_optimization_passes.
build_ssa won't benefit because it is already done.

For calls going forward the fixup will happen at beggining of 
pass_build_ssa_passes
and thus build_ssa will benefit from it.

Honza

Reply via email to