[llvm-dev] [ScalarEvolution][SCEV] no-wrap flags dependent on order of getSCEV() calls
Geoff Berry via llvm-dev
llvm-dev at lists.llvm.org
Wed Aug 9 08:58:44 PDT 2017
On 8/8/2017 8:38 PM, Sanjoy Das wrote:
> Hi,
>
> On Tue, Aug 8, 2017 at 12:58 PM, Friedman, Eli <efriedma at codeaurora.org> wrote:
>> Oh, I see... yes, we do stupid things involving mutating NoWrap flags after
>> a SCEV is created. (grep for setNoWrapFlags in ScalarEvolution.cpp.)
>
> That's really a compile time hack -- we defer some expensive tricks to
> prove nsw/nuw on an add recurrences to when we've been asked to
> sign/zero extend said add recurrence.
If that is the case, preserving SCEV analysis where we didn't before should only
result in later passes seeing more nsw/nuw flags, which should theoretically be
beneficial?
> I would be okay if you wanted to expose those tricks via a helper in
> SCEV that could be called independently of creating zero or sign
> extensions. That way SCEV clients could trade-off compile time for> more precise information in a granular way.
I'm not concerned with getting better SCEV results at the moment, I just want to
make sure that changing these passes to preserve SCEV analysis is behaving as
expected (which it sounds like it is).
>
> -- Sanjoy
>
>>
>> -Eli
>>
>> --
>> Employee of Qualcomm Innovation Center, Inc.
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
>> Foundation Collaborative Project
>>
--
Geoff Berry
Employee of Qualcomm Datacenter Technologies, Inc.
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
More information about the llvm-dev
mailing list