[llvm] [Analysis]: Allow inlining recursive call IF recursion depth is 1. (PR #119677)
Hassnaa Hamdi via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 3 13:22:58 PST 2025
hassnaaHamdi wrote:
> doesn't this miscompile a non-recursive call to a recursive function? we're assuming the recursion has happened, which isn't true if the caller was another function
Thanks @aeubanks for the review.
No, this works only for recursive functions, the code bails out if it's not recursive function:
`if (!Call || Call->getFunction() != F)
continue;`
https://github.com/llvm/llvm-project/pull/119677
More information about the llvm-commits
mailing list