[Inliner] Consistently apply callsite noalias metadata
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 31 Oct 2020 09:51:12 +0000 (10:51 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 31 Oct 2020 09:54:45 +0000 (10:54 +0100)
commit27f647d117087ca11959e232e6443f4aee31e966
tree0ea7045f46e492745b16d3ce46d700a44f72bec5
parent61b1446a9e45beb77705dce7358b511dd0e8800e
[Inliner] Consistently apply callsite noalias metadata

Previously, !noalias and !alias.scope metadata on the call site was
applied as part of CloneAliasScopeMetadata(), which short-circuits
if the callee does not use any noalias metadata itself. However,
these two things have no relation to each other.

Consistently apply !noalias and !alias.scope metadata by integrating
this into an existing function that handled !llvm.access.group and
!llvm.mem.parallel_loop_access metadata. The handling for all of
these metadata kinds essentially the same.
llvm/lib/Transforms/Utils/InlineFunction.cpp
llvm/test/Transforms/Inline/noalias-cs.ll