This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug? flow_find_cross_jump deletes USE insns ...
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 16 Jan 2002 11:41:03 +0100
- Subject: Re: Bug? flow_find_cross_jump deletes USE insns ...
- References: <OF9C1CFAC0.05127CCD-ONC1256B41.005644DA@de.ibm.com> <20020114125622.C9448@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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