[llvm-dev] [ScalarEvolution][SCEV] no-wrap flags dependent on order of getSCEV() calls

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 8 17:38:11 PDT 2017


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.

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.

-- Sanjoy

>
> -Eli
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
> Foundation Collaborative Project
>


More information about the llvm-dev mailing list