This patch integrates operand bundle llvm.assumes [0] with the
Attributor. Most IRAttributes will now look at uses of the associated
value and if there are llvm.assume operand bundle uses with the right
tag we will check if they are in the must-be-executed-context (around
the context instruction).
This includes a bug fix for KnowledgeRetention.
[0] http://lists.llvm.org/pipermail/llvm-dev/2019-December/137632.html
I think using nullptr as a flag to indicate subsuming positions seems a bit difficult to read.
Could you simply add some boolean flag and replace the argument with a reference?