This is an archive of the discontinued LLVM Phabricator instance.

[IPSCCP] Use ParamState for arguments at call sites.
ClosedPublic

Authored by fhahn on Dec 23 2019, 5:26 AM.

Details

Summary

We currently use integer ranges to merge concrete function arguments.
We use the ParamState range for those, but we only look up concrete
values in the regular state. For concrete function arguments that are
themselves arguments of the containing function, we can use the param
state directly and improve the precision in some cases.

Besides improving the results in some cases, this is also a small step towards
switching to ValueLatticeElement, by allowing D60582 to be a NFC.

Diff Detail

Event Timeline

fhahn created this revision.Dec 23 2019, 5:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 23 2019, 5:26 AM
Herald added a subscriber: hiraditya. · View Herald Transcript

Unit tests: pass. 61102 tests passed, 0 failed and 728 were skipped.

clang-tidy: fail. Please fix clang-tidy findings.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

So this is intentionally a sort of baby step towards using ValueLatticeElement everywhere? That makes sense, but please add a comment explaining that.

fhahn edited the summary of this revision. (Show Details)Jan 21 2020, 7:45 PM

So this is intentionally a sort of baby step towards using ValueLatticeElement everywhere? That makes sense, but please add a comment explaining that.

Exactly! I've updated the description.

Thanks for taking a look :)

This revision is now accepted and ready to land.Jan 22 2020, 1:56 PM
This revision was automatically updated to reflect the committed changes.