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]

Re: Patch to fix emit_insn_before


Just curious what the status is of this patch.  For example,
emit_swap_insn contains:

  ...
   else if (current_block)
    {
      i1 = emit_insn_before (swap_rtx, current_block->head);
      current_block->head = i1;
    }
  else
    emit_insn_before (swap_rtx, insn);

If swap_rtx is a sequence and emit_insn_before returns the last
insn in the sequence than current_block->head will be updated
incorrectly.  Of course instead of changing emit_insn_before
it may be better to change emit_swap_insn to:

   ...
   else
     emit_block_insn_before (swap_rtx, current_block->head, current_block);

A similar issue exists with scan_one_insn.

Looking closer at emit_block_insn_before it appears okay and
my recent change to insert_insn_end_bb avoids the problem there.

Should I simply submit a patch which changes emit_swap_insn
and scan_one_insn to use emit_block_insn_before and call it
a day instead of pursuing the change to emit_insn_before?

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------


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