Hi Uros! Accommodated the changes that you mentioned. Completed the bootstrap testing too.
Regards Ganesh -----Original Message----- From: Uros Bizjak [mailto:ubiz...@gmail.com] Sent: Wednesday, December 04, 2013 3:17 PM To: Gopalasubramanian, Ganesh Cc: gcc-patches@gcc.gnu.org; Richard Guenther <richard.guent...@gmail.com> (richard.guent...@gmail.com) Subject: Re: [RFC] [PATCH, i386] Adjust unroll factor for bdver3 and bdver4 On Wed, Dec 4, 2013 at 9:39 AM, Gopalasubramanian, Ganesh <ganesh.gopalasubraman...@amd.com> wrote: > Attached is the revised patch. > The target independent part has been already approved and added. > > This revision of the patch adds a x86 tune definition and checks it while > deciding the unroll factor. > > Accommodated the comments given by you except one. > >> *x will never be null for active insns. > Since every rtx in the insn is checked for memory references, the NULL_RTX > check is required. Yes you are correct. for_each_rtx also passes NULL_RTX, I was distracted by "There are no sub-expressions." comment. + if (NONDEBUG_INSN_P (insn) && INSN_CODE (insn) != -1) Do you need to check for INSN_CODE here? IIRC, checking for NONDEBUG_INSN_P is enough. + for_each_rtx (&insn, (rtx_function) ix86_loop_memcount, &mem_count); + } + free (bbs); + + if (mem_count <=32) + return 32/mem_count; Ouch... mem_count can be zero. Is there a reason to change this part from previous patch? Uros.
unroll-adjust.patch
Description: unroll-adjust.patch