[ConstantRange] Add API for intrinsics (NFC)
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 25 Jul 2020 14:21:55 +0000 (16:21 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 29 Jul 2020 20:16:27 +0000 (22:16 +0200)
commit897bdca4b81dff200714a5b1cb22b20e9c4c4594
tree4ad3dcf6a261725b03e015aa6b9caeac1148a5ee
parent77c3b016c42412edd43568b001fe358425a113dd
[ConstantRange] Add API for intrinsics (NFC)

This adds a common API for compute constant ranges of intrinsics.
The intention here is that
a) we can reuse the same code across different passes that handle
   constant ranges, i.e. this can be reused in SCCP
b) we only have to add knowledge about supported intrinsics to
   ConstantRange, not any consumers.

Differential Revision: https://reviews.llvm.org/D84587
llvm/include/llvm/IR/ConstantRange.h
llvm/lib/Analysis/LazyValueInfo.cpp
llvm/lib/IR/ConstantRange.cpp