[TargetLibraryInfo] Pick new/delete calls by target
authorPaul Robinson <paul.robinson@sony.com>
Fri, 24 Sep 2021 13:10:02 +0000 (06:10 -0700)
committerPaul Robinson <paul.robinson@sony.com>
Tue, 28 Sep 2021 17:10:25 +0000 (10:10 -0700)
commit56e681afcce53d2a6eb1df2724c715bd95a43a25
tree59c24400d725660c450cb6acb688f8ffb4158ab9
parentbddc04bc4cd5fed35b5fc10955612b6718696a95
[TargetLibraryInfo] Pick new/delete calls by target

There are two sets of new/delete functions, one with Windows/MSVC
mangling and one with Itanium mangling. Mark one set or the other
as unavailable depending on the target.

Split the test malloc-free-delete.ll into three parts: malloc-free.dll
for the C API tests, new-delete-itanium.ll and new-delete-msvc.ll for
the target-specific new/delete tests.

Differential Revision: https://reviews.llvm.org/D110419
llvm/lib/Analysis/TargetLibraryInfo.cpp
llvm/test/Transforms/InstCombine/malloc-free-delete.ll [deleted file]
llvm/test/Transforms/InstCombine/malloc-free.ll [new file with mode: 0644]
llvm/test/Transforms/InstCombine/new-delete-itanium.ll [new file with mode: 0644]
llvm/test/Transforms/InstCombine/new-delete-msvc.ll [new file with mode: 0644]