This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Another bug in your lastest checkin.


Jan,

The function.c(thread_prologue_epilogue_insns) part of this change is wrong.

Mon Jul 30 22:16:08 CEST 2001  Jan Hubicka  <jh@suse.cz>

        * i386.c (ix86_output_main_function_alignment_hack): New function.
        (TARGET_ASM_FUNCTION_PROLOGUE): Default to it.

        * flow.c (mark_dfs_back_edges): Move from loop_p ; mark back
        edges by EDGE_DFS_BACK flag.
        (dump_edge_info): Add dfs_back flag.
        * basic-block.h (EDGE_DFS_BACK): New constant.
        (mark_dfs_back_edges): Declare.
        * alias.c (loop_p): Remove.
        (mark_constant_function): Use mark_dfs_back_edges.

        * reg-stack.c (block_info_def): Add predecesors counter and stack_out.
        (reg_to_stack): Call mark_dfs_back_edges; count the predecesors.
        (compensate_edge): Break out from ...
        (convert_regs_1): ... here; do smart choosing of stack_out to copy.
        (convert_regs_2): Set block_done once block is really done;
        Do updating of the predecesors counts.

        * toplev.c (rest_of_compilation): Recompute block_for_insn
        before post-reload cfg_cleanup.
        * function.c (thread_prologue_epilogue_insns):
        Call set_block_for_new_insns when emitting prologue directly.

set_block_for_new_insns requires a basic_block and note an edge.
I've no idea how this apparently works assuming that the else part
of the code actually gets exercised.

      /* If optimization is off, and perhaps in an empty function,
         the entry block will have no successors.  */
      if (ENTRY_BLOCK_PTR->succ)
        {
          /* Can't deal with multiple successsors of the entry block.  */
          if (ENTRY_BLOCK_PTR->succ->succ_next)
            abort ();

          insert_insn_on_edge (seq, ENTRY_BLOCK_PTR->succ);
          inserted = 1;
        }
      else
        set_block_for_new_insns (emit_insn_after (seq, f),
                                 ENTRY_BLOCK_PTR->succ);
				 ^requires BB and not EDGE!

Graham


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]