On Tue, Mar 27, 2012 at 3:54 AM, Alan Modra <amo...@gmail.com> wrote:
> Now that we are back in stage1, I'd like to apply
> http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00304.html, a change to
> toc reference rtl in order to properly specify r2 dependencies.  More
> commentary in that url.  I'm reposting the patch here since the old
> one no longer applies cleanly, and I've added some ENABLE_CHECKING
> code in rs6000_delegitimize_address.
>
> Bootstrapped and regression tested powerpc64-linux.  OK for mainline?
>
>        * cselib.c (preserve_only_constants): Remove HIGH rtx containing
>        value references.
>        * cprop.c (cprop_constant_p): Return false for HIGH rtx containing
>        value references.
>        * config/rs6000/predicates.md (input_operand): Match unspec.  Remove
>        redundant tests.
>        * rs6000-protos.h (toc_relative_expr_p): Update prototype.
>        * const/rs6000/rs6000.c (tocrel_base, tocrel_offset): Make const.
>        (legitimate_constant_pool_address_p): Move TARGET_TOC test and
>        register checks to..
>        (toc_relative_expr_p): ..here.  Add "strict" param.  Match new rtl
>        generated by create_TOC_reference.
>        (rs6000_delegitimize_address): Handle new rtl for toc refs.
>        (rs6000_cannot_force_const_mem, rs6000_find_base_term): Likewise.
>        (use_toc_relative_ref): New function, split out from..
>        (rs6000_emit_move): ..here.  Remove redundant tests.
>        (rs6000_legitimize_reload_address): Formatting.  Remove redundant
>        code.  Use use_toc_relative_ref.
>        (print_operand): Formatting, style.  Adjust for toc changes.
>        (print_operand_address): Likewise.
>        (rs6000_output_addr_const_extra): Likewise.
>        (create_TOC_reference): Put TOC_REGISTER in UNSPEC_TOCREL rather
>        than a PLUS.  Use this formulation for both high and low part
>        of -mcmodel=medium/large toc reference too.
>        * config/rs6000/rs6000.md (tls_gd, tls_gd_high): Similarly avoid
>        a PLUS in high part of addresses here.
>        (tls_ld, tls_ld_high, tls_got_dtprel, tls_got_dtprel_high): Likewise.
>        (tls_got_tprel, tls_got_tprel_high, largetoc_high): Likewise.
>        (largetoc_high, largetoc_low): Move earlier.  Cope when no
>        base reg available.

Now that PPC bootstrap appears to be fixed, this patch is okay to apply.

However, I cannot approve the cselib.c and cprop.c changes.

Thanks, David

Reply via email to