This is the mail archive of the gcc@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: REG_LIBCALL noop move problems


> Compiling gcc.c-torture/unsorted/BUG25.c on HP-PA with
> -O2 yields the following bit of rtl after addressof runs:
> 
> (insn 11 23 12 (set (reg:SI 26 %r26)
>         (reg:SI 26 %r26)) 68 {*pa.md:2088} (nil)
>     (insn_list:REG_LIBCALL 14 (nil)))
> 
> (call_insn 12 11 14 (parallel[ 
>             (set (reg:SI 28 %r28)
>                 (call (mem:SI (symbol_ref:SI ("@ffs")) 0)
>                     (const_int 16 [0x10])))
>             (clobber (reg:SI 2 %r2))
>             (use (const_int 0 [0x0]))
>         ] ) 275 {call_value_internal_symref} (nil)
>     (expr_list:REG_EH_REGION (const_int -1 [0xffffffff])
>         (nil))
>     (expr_list (use (reg:SI 26 %r26))
>         (nil)))
> 
> (insn 14 12 15 (set (reg:SI 96)
>         (reg:SI 28 %r28)) 68 {*pa.md:2088} (nil)
>     (insn_list:REG_RETVAL 11 (expr_list:REG_EQUAL (ffs:SI (reg:SI 26 %r26))
>             (nil))))
> 
> Running life_analysis (in order to setup things need by VRP)
> causes insn 11 to be deleted by delete_noop_moves which
> orphans the REG_RETVAL note.  Things later splat in propagate_block
> as it walks off the beginning of the function due to the REG_RETVAL
> note pointing to a deleted insn which is now before basic block 0.
> 
> Should delete_noop_moves skip an insn with a REG_LIBCALL note,
> simply move the note to the next real insn (adjusting the REG_RETVAL
> note), or should the problem be solved in some other fashion?

I do have patch (not reviewed yet) that makes delete_insn to update
REG_LIBCALL/REG_RETVAL notes.  The REG_RETVAL note is causing problem, as the
noop move can not be removed w/o losing of whole libcall, so I am postnoting
the deleting since after flow pass (before combine), where we mess up the notes
anyway (the delete_insn aborts if you attempt to do so). Before combine I
delete them and cleanup the remaining noops.

Thank you for working on VRP again!

Honza
> 
> -- 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]