This is an archive of the discontinued LLVM Phabricator instance.

Backport 4878aa36d4a [ValueLattice] Add new state for undef constants.
AbandonedPublic

Authored by fhahn on Mar 23 2020, 3:46 AM.

Details

Summary
NOTE: I mostly put it on Phabricator to make it easy for other people to fetch & check if that fixes a bug.

This patch backports 4878aa36d4a and required earlier patches onto
the release/10.x branch.

It includes the following patches:

aa5ebfdf205de6d599c1fed3161da3b63b6f0bef [ValueLattice] Make mark* functions public, return if value changed.

c1943b42c5b7feff5d0e0c1358d02889e2be165f [ValueLattice] Update markConstantRange to return false equal ranges.

e30c257811f62fea21704caa961c61e4559de202 [CVP,SCCP] Precommit test for D75055.

4878aa36d4aa27df644430139fab2734fde4a000 [ValueLattice] Add new state for undef constants.

All patches except the last one apply cleanly. For the last one, the
changes to SCCP.cpp were stripped, because SCCP does not yet use
ValueLattice on release/10.x. Otherwise we would have to pull in more
additional changes.

Diff Detail

Event Timeline

fhahn created this revision.Mar 23 2020, 3:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2020, 3:46 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
tstellar added inline comments.
llvm/include/llvm/Analysis/ValueLattice.h
37

I'm fairly certain this is an API and ABI breaking change, I'm fixing up the abi check job on GitHub actions to try to confirm this.

142

Removing this is an ABI breaking change, so the patch would need to be modified to keep this in.

fhahn updated this revision to Diff 258319.Apr 17 2020, 7:25 AM

Move new undef value to bottom, bring back isUndefined.

fhahn marked 2 inline comments as done.Apr 17 2020, 7:36 AM
fhahn added inline comments.
llvm/include/llvm/Analysis/ValueLattice.h
37

I moved the new value to the end. Maybe that helps for existing clients?

142

I kept isUndefined, which should just be isUnknownOrUndef.

fhahn updated this revision to Diff 258325.Apr 17 2020, 7:39 AM

Use isUnknownOrUndef for isUndefined().

fhahn abandoned this revision.May 26 2020, 1:51 PM

@tstellar merged this onto the 10.0.1 branch using a Github PR