[SCCP] Add range metadata to call sites with known return ranges.
authorFlorian Hahn <flo@fhahn.com>
Tue, 21 Jul 2020 09:01:42 +0000 (10:01 +0100)
committerFlorian Hahn <flo@fhahn.com>
Tue, 21 Jul 2020 09:06:54 +0000 (10:06 +0100)
commit752fea7c27b66b7d34925335541f843eb46f16d6
tree79ab4c44634f59deb5722f706cecafdcea561289
parenteef162c330b02fdc53ec33e5549635be5c5911fa
[SCCP] Add range metadata to call sites with known return ranges.

If we inferred a range for the function return value, we can add !range
at all call-sites of the function, if the range does not include undef.

Reviewers: efriedma, davide, nikic

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D83952
llvm/lib/Transforms/Scalar/SCCP.cpp
llvm/test/Transforms/SCCP/ip-add-range-to-call.ll