[AA] Refine ModRefInfo for llvm.memcpy.* in presence of operand bundles
authorEvgeniy Brevnov <ybrevnov@azul.com>
Mon, 24 Jan 2022 09:29:46 +0000 (16:29 +0700)
committerEvgeniy Brevnov <ybrevnov@azul.com>
Tue, 25 Jan 2022 03:15:23 +0000 (10:15 +0700)
commit0e55d4fab0183b6dca82ce127b78ded3db918c27
tree2ec75040400744537fea0a16b5fb6b780f5eb75d
parent9ea3dfa5d015f61ff282ed88d08125bb38fd19a8
[AA] Refine ModRefInfo for llvm.memcpy.* in presence of operand bundles

Presence of operand bundles changes semantics in respect to ModRef. In particular, spec says: "From the compilers perspective, deoptimization operand bundles make the call sites theyre attached to at least readonly. They read through all of their pointer typed operands (even if theyre not otherwise escaped) and the entire visible heap. Deoptimization operand bundles do not capture their operands except during deoptimization, in which case control will not be returned to the compiled frame". Fix handling of llvm.memcpy.* according to the spec.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D118033
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/test/Analysis/BasicAA/deoptimize.ll