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]
Other format: [Raw text]

Re: Bug? flow_find_cross_jump deletes USE insns ...


On Mon, Jan 14, 2002 at 12:56:22PM -0800, Richard Henderson wrote:
> On Mon, Jan 14, 2002 at 04:56:53PM +0100, Ulrich Weigand wrote:
> > The prolog on S/390 generates a USE insn for the GOT register,
> > because the GOT pointer must be loaded even if it isn't used
> > in the routine (because the PLT stubs rely on the register).
> 
> This isn't going to work.  Bare USE insns aren't meaningful
> after reload.  You need to add the USE to the call insn.  You
> can do this either inside the call pattern itself, or by adding
> it to the CALL_INSN_FUNCTION_USAGE expr_list.

I have a similar problem on IA-64, unfortunately there is no call where to
stick the USEs in.
If during ia64_expand_epilogue exit block is not reachable (thus epilogue_p
is 0), then it generates code like:
(insn/f 160 126 162 (parallel[
            (set (reg:DI 34 r36)
                (unspec_volatile:DI[
                        (const_int 0 [0x0])
                    ]  0))
            (use (const_int 2 [0x2]))
            (use (const_int 3 [0x3]))
            (use (const_int 2 [0x2]))
            (use (const_int 0 [0x0]))
        ] ) -1 (nil)
    (nil))
(insn/f 162 160 163 (set (reg:DI 33 r35)
        (reg:DI 320 b0)) -1 (nil)
    (nil))
(insn 163 162 164 (use (reg:DI 33 r35)) -1 (nil)
    (nil))

where the use is trying to make sure the set before it is not deleted:
          /* Even if we're not going to generate an epilogue, we still
             need to save the register so that EH works.  */
          if (! epilogue_p)
            emit_insn (gen_rtx_USE (VOIDmode, alt_reg));
If bare USE insns aren't meaningful after reload (and this is after reload),
then something else needs to be done.
What is the preferred way here?
Use some dummy unspec insn which will contain all the USEs, or use some
unspec insn in the sets (like
(set (reg:DI 33 r35) (unspec:DI[(reg:DI 320 b0)]  FOO))
), or something else?

	Jakub


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