HomePhabricator

[SCEV] Factor out part of wrap flag detection logic [NFC-ish]

Authored by reames on Sat, Nov 14, 7:15 PM.

Description

[SCEV] Factor out part of wrap flag detection logic [NFC-ish]

In an effort to make code around flag determination more readable, and (possibly) prepare for a follow up change, factor out some of the flag detection logic. In the process, reduce the number of locations we mutate wrap flags by a couple.

Note that this isn't NFC. The old code tried for NSW xor (NUW || NW). This is, two different paths computed different sets of wrap flags. The new code will try for all three. The result is that some expressions end up with a few extra flags set.