On Tue, Oct 13, 2015 at 1:27 AM, Richard Henderson <r...@redhat.com> wrote:
> On 10/12/2015 09:10 PM, Richard Biener wrote:
>>>>
>>>> The check_loadstore change should instead have adjusted the
>>>> flag_delete_null_pointer_checks guard in
>>>> infer_nonnull_range_by_dereference.
>>>
>>>
>>>
>>> Nope, that doesn't work.  You have to wait until you see the actual MEM
>>> being dereferenced before you can look at it's address space.
>>
>>
>> Well, as we are explicitely looking for the pointer 'op' we know the
>> address-space
>> beforehand, no?  TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (op)))?
>
>
> No.  We don't even know what type we're looking for; we're merely looking
> for any use of NULL within any memory reference within STMT.
>
> Specifically, when we're not looking for a specific SSA_NAME (which would be
> properly typed), we always pass in a plain (void *)0:
>
>           bool by_dereference
>             = infer_nonnull_range_by_dereference (stmt, null_pointer_node);

Ick.

Richard.

>
>
> r~

Reply via email to