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, i386] Avoid LCP stalls (issue5975045)


Hello!

> New patch to avoid LCP stalls based on feedback from earlier patch. I modified
> H.J.'s old patch to perform the peephole2 to split immediate moves to HImode
> memory. This is now enabled for Core2, Corei7 and Generic.

> 2012-04-04   Teresa Johnson  <tejohnson@google.com>
>
> 	* config/i386/i386.h (ix86_tune_indices): Add
> 	X86_TUNE_LCP_STALL.
>	* config/i386/i386.md (move immediate to memory peephole2):
> 	Add cases for HImode move when LCP stall avoidance is needed.
> 	* config/i386/i386.c (initial_ix86_tune_features): Initialize
> 	X86_TUNE_LCP_STALL entry.

   "optimize_insn_for_speed_p ()
-   && !TARGET_USE_MOV0
-   && TARGET_SPLIT_LONG_MOVES
-   && get_attr_length (insn) >= ix86_cur_cost ()->large_insn
+   && ((TARGET_LCP_STALL
+       && GET_MODE (operands[0]) == HImode)
+       || (!TARGET_USE_MOV0
+          && TARGET_SPLIT_LONG_MOVES
+          && get_attr_length (insn) >= ix86_cur_cost ()->large_insn))

Please change added condition to:

&& ((<MODE>mode == HImode
        && TARGET_LCP_STALL)
       || (...))

Please also add H.J. as co-author of this change to ChangeLog.

OK with these changes.

Thanks,
Uros.


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