[PATCH] Converting RTL passes to the tree-pass.h structure 1/n

Nathanael Nerode neroden@fastmail.fm
Mon Aug 16 16:41:00 GMT 2004

Paolo Bonzini wrote:
>My patch makes your pass_prep_rtl irrelevant though,
Not quite.  :-)

>because I moved that stuff into cfgexpand.c.
Only up to the dump.  Merged, my pass_prep_rtl would still contain the
material between that and the bail-out:

  /* When processing delayed functions, prepare_function_start () won't
     have been run to re-initialize it.  */
  cse_not_expected = ! optimize;
  /* Convert from NOTE_INSN_EH_REGION style notes, and do other
     sorts of eh initialization.  Delay this until after the
     initial rtl dump so that we can see the original nesting.  */
  convert_from_eh_region_ranges ();

  /* If we're emitting a nested function, make sure its parent gets
     emitted as well.  Doing otherwise confuses debug info.  */
    tree parent;
    for (parent = DECL_CONTEXT (current_function_decl);
         parent != NULL_TREE;
         parent = get_containing_scope (parent))
      if (TREE_CODE (parent) == FUNCTION_DECL)

  /* We are now committed to emitting code for this function.  Do any
     preparation, such as emitting abstract debug info for the inline
     before it gets mangled by optimization.  */
  if (cgraph_function_possibly_inlined_p (current_function_decl))
    (*debug_hooks->outlining_inline_function) (current_function_decl);

  /* Remove any notes we don't need.  That will make iterating
     over the instruction sequence faster, and allow the garbage
     collector to reclaim the memory used by the notes.  */
  remove_unnecessary_notes ();
  /* Initialize some variables used by the optimizers.  */
  init_function_for_compilation ();

  TREE_ASM_WRITTEN (current_function_decl) = 1;

...now, virtually all of that is scheduled to die sooner or later, but
I expect it will die a little bit at a time.

>That's the only places that conflicts.

This space intentionally left blank.

More information about the Gcc-patches mailing list