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 1/2] Introduce prefetch-minimum stride option


On Wed, May 23, 2018 at 3:41 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, May 23, 2018 at 3:35 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
>>>
>>> Sorry. Does the following fix it for i686?
>>>
>>
>> Index: gcc/tree-ssa-loop-prefetch.c
>> ===================================================================
>> --- gcc/tree-ssa-loop-prefetch.c (revision 260625)
>> +++ gcc/tree-ssa-loop-prefetch.c (working copy)
>> @@ -1014,7 +1014,8 @@
>>   fprintf (dump_file,
>>   "Step for reference %u:%u (%ld) is less than the mininum "
>>                                               ^^^ Please use
>> HOST_WIDE_INT_PRINT_DEC
>>   "required stride of %d\n",
>> - ref->group->uid, ref->uid, int_cst_value (ref->group->step),
>> + ref->group->uid, ref->uid,
>> + (HOST_WIDE_INT) int_cst_value (ref->group->step),
>>   PREFETCH_MINIMUM_STRIDE);
>>
>>
>
> Something like this.
>
> --
> H.J.
> ---
> diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
> index c3e7fd1e529..949a67f360e 100644
> --- a/gcc/tree-ssa-loop-prefetch.c
> +++ b/gcc/tree-ssa-loop-prefetch.c
> @@ -1012,8 +1012,8 @@ should_issue_prefetch_p (struct mem_ref *ref)
>      {
>        if (dump_file && (dump_flags & TDF_DETAILS))
>    fprintf (dump_file,
> -      "Step for reference %u:%u (%ld) is less than the mininum "
> -      "required stride of %d\n",
> +      "Step for reference %u:%u (" HOST_WIDE_INT_PRINT_C
> +      ") is less than the mininum required stride of %d\n",
>        ref->group->uid, ref->uid, int_cst_value (ref->group->step),
>        PREFETCH_MINIMUM_STRIDE);
>        return false;

I meant:

diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index c3e7fd1e529..e34b78dc186 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -1012,8 +1012,8 @@ should_issue_prefetch_p (struct mem_ref *ref)
     {
       if (dump_file && (dump_flags & TDF_DETAILS))
   fprintf (dump_file,
-      "Step for reference %u:%u (%ld) is less than the mininum "
-      "required stride of %d\n",
+      "Step for reference %u:%u (" HOST_WIDE_INT_PRINT_DEC
+      ") is less than the mininum required stride of %d\n",
       ref->group->uid, ref->uid, int_cst_value (ref->group->step),
       PREFETCH_MINIMUM_STRIDE);
       return false;


-- 
H.J.


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