This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] [PATCH, i386] Adjust unroll factor for bdver3 and bdver4
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "Gopalasubramanian, Ganesh" <Ganesh dot Gopalasubramanian at amd dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "Richard Guenther <richard dot guenther at gmail dot com> (richard dot guenther at gmail dot com)" <richard dot guenther at gmail dot com>
- Date: Wed, 4 Dec 2013 10:46:49 +0100
- Subject: Re: [RFC] [PATCH, i386] Adjust unroll factor for bdver3 and bdver4
- Authentication-results: sourceware.org; auth=none
- References: <EB4625145972F94C9680D8CADD6516155E73BF13 at SATLEXDAG02 dot amd dot com> <CAFULd4Y6XyUTZk0j2opkMQPWMp+U-pv0rN0NbJusffudEv00Fw at mail dot gmail dot com> <EB4625145972F94C9680D8CADD6516155E741F49 at SATLEXDAG02 dot amd dot com>
On Wed, Dec 4, 2013 at 9:39 AM, Gopalasubramanian, Ganesh
<Ganesh.Gopalasubramanian@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.