[llvm] [Inliner] Don't count a call penalty for foldable __memcpy_chk and similar (PR #117876)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 05:52:18 PST 2024


================
@@ -2260,6 +2271,48 @@ bool CallAnalyzer::simplifyCallSite(Function *F, CallBase &Call) {
   return false;
 }
 
+bool CallAnalyzer::isLoweredToCall(Function *F, CallBase &Call) {
+  // Calls to memcpy with a known constant size 1/2/4/8 should not incur a call
----------------
fhahn wrote:

Might be good to move the comment to the case in the switch doing the checking, in case other libfuncs are added in the future to the switch?

https://github.com/llvm/llvm-project/pull/117876


More information about the llvm-commits mailing list