This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PARCH 2/2, x86, PR63534] Fix darwin bootstrap
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Evgeny Stupachenko <evstupac at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>, iains at gcc dot gnu dot org
- Date: Wed, 22 Oct 2014 23:40:49 +0200
- Subject: Re: [PARCH 2/2, x86, PR63534] Fix darwin bootstrap
- Authentication-results: sourceware.org; auth=none
- References: <CAOvf_xxtWrrAm_z3s3-xGMqkPPA7SppL-woFG-4docMrmZ1xGw at mail dot gmail dot com> <544822EE dot 7090709 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Oct 22, 2014 at 03:34:38PM -0600, Jeff Law wrote:
> >--- a/gcc/cse.c
> >+++ b/gcc/cse.c
> >@@ -6953,6 +6953,11 @@ delete_trivially_dead_insns (rtx_insn *insns, int nreg)
> > /* If no debug insns can be present, COUNTS is just an array
> > which counts how many times each pseudo is used. */
> > }
> >+ /* Pseudo PIC register should be considered as used due to possible
> >+ new usages generated. */
> >+ if (pic_offset_table_rtx
> >+ && REGNO (pic_offset_table_rtx) >= FIRST_PSEUDO_REGISTER)
> >+ counts[REGNO (pic_offset_table_rtx)]++;
> > /* Go from the last insn to the first and delete insns that only set unused
> > registers or copy a register to itself. As we delete an insn, remove
> > usage counts for registers it uses.
> Shouldn't this also be guarded with !reload_completed? One reload is
> complete all the implicit references to the PIC register should be explicit
> and thus there's no need to treat the PIC register special.
Supposedly this one yes.
> >diff --git a/gcc/dce.c b/gcc/dce.c
> >index 5b7d36e..a52a59c 100644
> >--- a/gcc/dce.c
> >+++ b/gcc/dce.c
> >@@ -127,6 +127,10 @@ deletable_insn_p (rtx_insn *insn, bool fast,
> >bitmap arg_stores)
> > if (HARD_REGISTER_NUM_P (DF_REF_REGNO (def))
> > && global_regs[DF_REF_REGNO (def)])
> > return false;
> >+ /* Initialization of pseudo PIC register should never be removed. */
> >+ else if (DF_REF_REG (def) == pic_offset_table_rtx
> >+ && REGNO (pic_offset_table_rtx) >= FIRST_PSEUDO_REGISTER)
> >+ return false;
> Similarly.
But here, after reload completes, there shouldn't be pseudos in the IL, so
the condition should not trigger anymore.
Jakub