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]

Re: [PATCH, rs6000] Fix insertion of nop[s] to force dependent load into new dispatch group.


On 05/23/2012 10:48 AM, Pat Haugen wrote:
The following patch fixes existing code that tried to prevent load-hit-store (LHS) from being in the same dispatch group. The main problem was use of the wrong dependency list in is_costly_group(), but I also added code to verify the memory refs overlap and to emit group ending nops for those ISAs that have them.

Bootstrap/regtest on powerpc64-linux with no new regressions. Ok for trunk?

-Pat


2012-05-23 Pat Haugen <pthaugen@us.ibm.com>


         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
         rs6000_sched_costly_dep default to true_store_to_load_dep_costly.
         (adjacent_mem_locations): Move some code to and call...
         (get_memref_parts): ...new function.
         (mem_locations_overlap): New function.
         (rs6000_adjust_priority): Adjust calls to is_load_insn/is_store_insn.
         (is_mem_ref): Rename to...
         (find_mem_ref): ...this. Return MEM rtx.
         (get_store_dest): Remove function.
         (is_load_insn1, is_load_insn, is_store_insn1, is_store_insn): Add
         new parameter and adjust calls.
         (rs6000_is_costly_dependence): Update calls for extra arg. Make sure
         mem refs overlap for true_store_to_load_dep_costly.
         (rs6000_sched_reorder2): Update calls for extra arg. Adjust args
         passed to adjacent_mem_locations.
         (is_costly_group): Walk resolved dependency list.
         (force_new_group): Emit group ending nop for Power6/Power7.
         * config/rs6000/rs6000.md (UNSPEC_GRP_END_NOP): New enum value.
         (group_ending_nop): New define_insn.

gcc/testsuite:
         * gcc.target/powerpc/lhs-1.c: New.
         * gcc.target/powerpc/lhs-2.c: New.
         * gcc.target/powerpc/lhs-3.c: New.



Ok for backport to 4.7 branch now that that is open again?


-Pat


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