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

Ehud Katz via All-commits all-commits at lists.llvm.org
Wed Nov 27 22:39:22 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 825debe847d15a5670eff54745a6691145ddfae1
      https://github.com/llvm/llvm-project/commit/825debe847d15a5670eff54745a6691145ddfae1
  Author: Ehud Katz <ehudkatz at gmail.com>
  Date:   2019-11-28 (Thu, 28 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 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.

Fixes PR35469.

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




More information about the All-commits mailing list