[PATCH] D41719: [InlineCost] Prevent infinite recursion on function pointers

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 10:33:04 PST 2018


MatzeB added a comment.

We must have some pre-existing recursion check already as clang doesn't fail for obviously recursive cases. (I guess it's the code setting IsRecursiveCall).
I assume that code isn't working correctly with the testcases here can't we just fix that?

If we are going for arbitrary recursion limits, then we should probably have a comment for why the limit is 100 (and not 50 or 200) and it would probably be a good idea to add a cl::opt so people can tweak the limit if it doesn't work for them.


https://reviews.llvm.org/D41719





More information about the llvm-commits mailing list