MemoryBuiltins: accept non-TLI funcs with attribs as allocator funcs
authorAugie Fackler <augie@google.com>
Fri, 1 Apr 2022 02:33:13 +0000 (22:33 -0400)
committerAugie Fackler <augie@google.com>
Thu, 21 Jul 2022 19:31:16 +0000 (15:31 -0400)
commit62f48cadfd6667e5795b95a5aef7eadbe2ccc598
treed99ec7fdf7ea240eeae8ee62552a6e311b815552
parent5a3e3675f6be3c49fb1a305202888cce4d916ba6
MemoryBuiltins: accept non-TLI funcs with attribs as allocator funcs

This allows us to accept annotations from out-of-tree languages (the
example test is derived from Rust) so they can enjoy the benefits of
LLVM's optimizations without requiring LLVM to have language-specific
knowledge.

Differential Revision: https://reviews.llvm.org/D123091
llvm/lib/Analysis/MemoryBuiltins.cpp
llvm/test/Transforms/InstCombine/out-of-tree-allocator-optimizes-away.ll [new file with mode: 0644]