[PATCH] D69349: [InlineCost] Fix infinite loop in indirect call evaluation

Ehud Katz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 23 10:14:21 PDT 2019


ekatz created this revision.
ekatz added reviewers: chandlerc, echristo.
ekatz added a project: LLVM.
Herald added subscribers: llvm-commits, haicheng, hiraditya, eraman.

Currently every time we encounter an indirect call of a known function, we try to evaluate the inline cost of that function. In case of a recursion, that evaluation never stops.

The solution I propose is to evaluate only the indirect call of the function, while any further indirect calls (of a known function) will be treated just as direct function calls, which, actually, never tries to evaluate the call.

Fix PR35469.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69349

Files:
  llvm/lib/Analysis/InlineCost.cpp
  llvm/test/Transforms/Inline/pr35469.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69349.226162.patch
Type: text/x-patch
Size: 11047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191023/776f042e/attachment.bin>


More information about the llvm-commits mailing list