[Attributor] Add flag for undef value to the state of AAPotentialValues
authorShinji Okumura <okuraofvegetable@gmail.com>
Thu, 27 Aug 2020 07:30:29 +0000 (16:30 +0900)
committerShinji Okumura <okuraofvegetable@gmail.com>
Thu, 27 Aug 2020 07:30:29 +0000 (16:30 +0900)
commit6c25eca6142cec0695016b6fd012df56b50ee01b
tree3b0f634dc28f9b7245d34d02382e35942803e086
parent03141aa04acb2481652125c974bf3cfd125f4ce9
[Attributor] Add flag for undef value to the state of AAPotentialValues

Currently, an undef value is reduced to 0 when it is added to a set of potential values.
This patch introduces a flag for under values. By this, for example, we can merge two states `{undef}`, `{1}` to `{1}` (because we can reduce the undef to 1).

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D85592
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/potential.ll
llvm/test/Transforms/Attributor/value-simplify.ll