[LibCalls] Infer same attrs for reallocf() as realloc()
authorNikita Popov <npopov@redhat.com>
Fri, 7 Jan 2022 08:48:10 +0000 (09:48 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 7 Jan 2022 08:51:15 +0000 (09:51 +0100)
commit348bc76e3548c52dbcd442590ca0a7f5b09b7534
tree5de5a9a0899a156c95f06e31830d6e937ad654d7
parent38efa68b083e419301d4df55f1cb48a90cf088b2
[LibCalls] Infer same attrs for reallocf() as realloc()

reallocf() is the same as realloc() but frees the input pointer
on failure as well. We can infer the same attributes.

Also combine some cases that infer the same attributes and are
logically related.
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
llvm/test/Transforms/InferFunctionAttrs/annotate.ll