This is the mail archive of the gcc-patches@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]

patch adding LRA usage for ppc


I've committed the following patch to use LRA for ppc. By default reload pass is used. To use LRA, please add option -mlra.

I also removed change in constraints for swap insn as it was requested by David Edelsohn. It was necessary to fix one failure of new gcc tests. I'll work on more safe fix for this later.

The patch also fixes LRA crash on 32-bit SPEC2006 gamess reported by Mike Meissner.

There is still LRA crash on SPEC2006 dealII in 32-bit mode with options used by Mike. It is an issue with address constraints for TImode. I'll work on this. I guess address legitimize hook will solve the problem. Currently LRA does not use this hook. This hook is also needed to fix a LRA failures on ARM.

Some tests for SDmode can fail for LRA as it generates a different code than reload. If all toolchain is built with LRA, the failures will be gone.

  The patch was bootstrapped on ppc64 with LRA on/off.

  Committed as rev. 204079.

2013-10-25  Vladimir Makarov <vmakarov@redhat.com>

        * config/rs6000/rs6000-protos.h
        (rs6000_secondary_memory_needed_mode): New prototype.
        * config/rs6000/rs6000.c: Include ira.h.
        (TARGET_LRA_P): Redefine.
        (rs6000_legitimate_offset_address_p): Call
        legitimate_constant_pool_address_p in strict mode for LRA.
        (rs6000_legitimate_address_p): Ditto.
        (legitimate_lo_sum_address_p): Add code for LRA.
        Use lra_in_progress.
        (rs6000_emit_move): Add LRA version of code to generate load/store
        of SDmode values.
        (rs6000_secondary_memory_needed_mode): New.
        (rs6000_alloc_sdmode_stack_slot): Do nothing for LRA.
        (rs6000_secondary_reload_class): Return NO_REGS for LRA for
        constants, memory, and FP registers.
        (rs6000_lra_p): New.
        * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): New
        macro.
        * config/rs6000/rs6000.opt (mlra): New option.
        * lra-spills.c (lra_final_code_change): Remove useless move insns.


Attachment: lra-ppc.patch
Description: Text document


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