[Attributor] Introduce a helper function to deal with undef + none
authorJohannes Doerfert <johannes@jdoerfert.de>
Sat, 8 May 2021 04:18:24 +0000 (23:18 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 7 Jul 2021 03:41:21 +0000 (22:41 -0500)
commitaa3768278d4b1c91e6e55b596fa0d832a25428dc
treedf87b3eb52c243c70e595bbfc6cc4e46e846cd8b
parentfc82409b5ce5ddcd038ff0bf192a9a2a03b23020
[Attributor] Introduce a helper function to deal with undef + none

We often need to deal with the value lattice that contains none and
undef as special values. A simple helper makes this much nicer.

Differential Revision: https://reviews.llvm.org/D103857
12 files changed:
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/dereferenceable-1.ll
llvm/test/Transforms/Attributor/liveness.ll
llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll
llvm/test/Transforms/Attributor/nocapture-2.ll
llvm/test/Transforms/Attributor/nonnull.ll
llvm/test/Transforms/Attributor/potential.ll
llvm/test/Transforms/Attributor/range.ll
llvm/test/Transforms/Attributor/returned.ll
llvm/test/Transforms/Attributor/value-simplify.ll