Aaron Sawdey <acsaw...@linux.ibm.com> writes:
> On 10/2/19 5:35 PM, Jakub Jelinek wrote:
>> On Wed, Oct 02, 2019 at 09:21:23AM -0500, Aaron Sawdey wrote:
>>>>> 2019-09-27  Aaron Sawdey <acsaw...@linux.ibm.com>
>>>>>
>>>>>   * builtins.c (expand_builtin_memory_copy_args): Add might_overlap parm.
>>>>>   (expand_builtin_memcpy): Use might_overlap parm.
>>>>>   (expand_builtin_mempcpy_args): Use might_overlap parm.
>>>>>   (expand_builtin_memmove): Call expand_builtin_memory_copy_args.
>>>>>   (expand_builtin_memory_copy_args): Add might_overlap parm.
>>>>>   * expr.c (emit_block_move_via_cpymem): Rename to
>>>>>   emit_block_move_via_pattern, add might_overlap parm, use cpymem
>>>>>   or movmem optab as appropriate.
>>>>>   (emit_block_move_hints): Add might_overlap parm, do the right
>>>>>   thing for might_overlap==true.
>>>>>   * expr.h (emit_block_move_hints): Update prototype.
>> 
>>> @@ -1622,13 +1624,30 @@
>>>        set_mem_size (y, const_size);
>>>      }
>>>
>>> -  if (CONST_INT_P (size) && can_move_by_pieces (INTVAL (size), align))
>>> +  bool pieces_ok = can_move_by_pieces (INTVAL (size), align);
>>> +  bool pattern_ok = false;
>>> +
>>> +  if (!CONST_INT_P (size) || !pieces_ok || might_overlap)
>> ...
>> 
>> This change broke rtl checking bootstrap.
>> You can't use INTVAL on size that isn't CONST_INT_P.
>> 
>> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
>> committed to trunk as obvious:
>
> Jakub,
>   Sorry about that! Now that you point it out, it's obvious. But what it means
> for me is that I need to be in the habit of bootstrapping with 
> --enable-checking=rtl
> when I make these changes.

Confusingly, it needs to be --enable-checking=yes,extra,rtl for rtl
to be a pure addition to the default.

I guess it's time for a new entry in the semi-regular series
"should rtl checking be enabled by default for development builds?" :-)
Is it realy so expensive that it needs to be off by default?  And do
we gain much from having it off by default when many developers just
enable it anyway?  The status quo seems like an unnecessary trap to me.

"rtl" checking is an everyday checking option that regularly finds
problems, unlike say "df" and "fold" (which very rarely find problems)
and "gcac" (which definitely isn't an everyday option).

Richard

Reply via email to