[Mlir-commits] [mlir] Fix Issue#82401: Infinite loop in MLIR inliner for indirect recursive call. (PR #124026)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jan 24 10:41:21 PST 2025


junfengd-nv wrote:

>  Do you know what the LLVM inliner does in this situation?
LLVM inliner does some inlining. parent1 inlined child.  Then when LLVM inliner considers "child" function,  parent1 is updated, it is recognized as a recursive call and won't be inlined into child. parent2 is inlined into child.  when considering "parent2", "child" is recognized as a recursive call and won't be inlined.  with -debug-only=inline.  I can see LLVM inliner split SCC, that may be the reason it doesn't trap into infinite loop.  " Inlined an internal call edge and split an SCC, retaining this to avoid infinite inlining."  
Agree with you, my current fix is conservative. I will spend more time to understand how to improve it. 


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


More information about the Mlir-commits mailing list