[InlineCost] model calls to llvm.objectsize.*
authorNick Desaulniers <ndesaulniers@google.com>
Tue, 24 Jan 2023 22:54:50 +0000 (14:54 -0800)
committerNick Desaulniers <ndesaulniers@google.com>
Tue, 24 Jan 2023 23:09:57 +0000 (15:09 -0800)
commitf1764d5b594ff6edbf8d17d196eb0b7a653ac0fc
treec741fe038d2e1e8a33a896fd75ef346f94e53bea
parent7532e88f38a417d3713cb179dc974948c30f0336
[InlineCost] model calls to llvm.objectsize.*

Very similar to https://reviews.llvm.org/D111272. We very often can
evaluate calls to llvm.objectsize.* regardless of inlining. Don't count
calls to llvm.objectsize.* against the InlineCost when we can evaluate
the call to a constant.

Link: https://github.com/ClangBuiltLinux/linux/issues/1302
Reviewed By: manojgupta

Differential Revision: https://reviews.llvm.org/D111456
llvm/lib/Analysis/InlineCost.cpp
llvm/test/Transforms/Inline/call-intrinsic-objectsize.ll [new file with mode: 0644]