[all-commits] [llvm/llvm-project] 854e95: [InlineCost] Fix infinite loop in indirect call ev...

Ehud Katz via All-commits all-commits at lists.llvm.org
Sat Nov 23 09:20:08 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 854e956219e78cb8d7ef3b021d7be6b5d6b6af04
      https://github.com/llvm/llvm-project/commit/854e956219e78cb8d7ef3b021d7be6b5d6b6af04
  Author: Ehud Katz <ehudkatz at gmail.com>
  Date:   2019-11-23 (Sat, 23 Nov 2019)

  Changed paths:
    M llvm/lib/Analysis/InlineCost.cpp
    A llvm/test/Transforms/Inline/inline-indirect-chain.ll

  Log Message:
  -----------
  [InlineCost] Fix infinite loop in indirect call evaluation

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 presented 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.

Fixes PR35469.

Differential Revision: https://reviews.llvm.org/D69349




More information about the All-commits mailing list