[all-commits] [llvm/llvm-project] ba1dfa: Keep import function list for inlinee profile update

WenleiHe via All-commits all-commits at lists.llvm.org
Wed Nov 6 18:40:10 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ba1dfae054b4c9a8b11aabd62fd0dcb792366206
      https://github.com/llvm/llvm-project/commit/ba1dfae054b4c9a8b11aabd62fd0dcb792366206
  Author: Wenlei He <aktoon at gmail.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M llvm/lib/IR/Function.cpp
    M llvm/lib/Transforms/Utils/InlineFunction.cpp
    A llvm/test/Transforms/SampleProfile/Inputs/inline-callee-update.prof
    A llvm/test/Transforms/SampleProfile/inline-callee-update.ll

  Log Message:
  -----------
  Keep import function list for inlinee profile update

Summary:
When adjusting function entry counts after inlining, Funciton::setEntryCount is called without providing an import function list. The side effect of that is the previously set import function list will be dropped. The import function list is used by ThinLTO to help import hot cross module callee for LTO inlining, so dropping that during ThinLTO pre-link may adversely affect LTO inlining. The fix is to keep the list while updating entry counts for inlining.

Reviewers: wmi, davidxl, tejohnson

Subscribers: mehdi_amini, hiraditya, dexonsmith, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list