This is an archive of the discontinued LLVM Phabricator instance.

[ConstantRange] Disallow NUW | NSW in makeGuaranteedNoWrapRegion()
ClosedPublic

Authored by nikic on Apr 12 2019, 12:59 PM.

Details

Summary

As motivated in D60598, this drops support for specifying both NUW and NSW in makeGuaranteedNoWrapRegion(). None of the users of this function currently make use of this.

When both NUW and NSW are specified, the exact nowrap region has two disjointed parts and makeGNWR() returns one of them. This result doesn't seem to be useful for anything, but makes the semantics of the function fuzzier.

After this change, I'd land an NFC rename from makeGuaranteedNoWrapRegion() to makeExactNoWrapRegion().

Diff Detail

Repository
rL LLVM

Event Timeline

nikic created this revision.Apr 12 2019, 12:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2019, 12:59 PM

That was added in D13612 This will be used in a future change to ScalarEvolution.,
but indeed, the (OBO::NoSignedWrap | OBO::NoUnsignedWrap) combination is not used anywhere.
I'm wondering if @sanjoy has any comments?

That was added in D13612 This will be used in a future change to ScalarEvolution.,
but indeed, the (OBO::NoSignedWrap | OBO::NoUnsignedWrap) combination is not used anywhere.
I'm wondering if @sanjoy has any comments?

I don't remember if I had any specific plans for (OBO::NoSignedWrap | OBO::NoUnsignedWrap) but please remove it if it is unused today.

This revision is now accepted and ready to land.Apr 13 2019, 11:07 AM
This revision was automatically updated to reflect the committed changes.