[all-commits] [llvm/llvm-project] d23c1d: [AutoFDO] Avoid merging inlinee samples multiple t...

Hongtao Yu via All-commits all-commits at lists.llvm.org
Fri Jul 31 09:30:38 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d23c1d6a8dddf0e1b9b9fa64726941e402ede8af
      https://github.com/llvm/llvm-project/commit/d23c1d6a8dddf0e1b9b9fa64726941e402ede8af
  Author: Hongtao Yu <hoy at fb.com>
  Date:   2020-07-31 (Fri, 31 Jul 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    A llvm/test/Transforms/SampleProfile/inline-mergeprof-dup.ll

  Log Message:
  -----------
  [AutoFDO] Avoid merging inlinee samples multiple times

A function call can be replicated by optimizations like loop unroll and jump threading and the replicates end up sharing the sample nested callee profile. Therefore when it comes to merging samples for uninlined callees in the sample profile inliner, a callee profile can be merged multiple times which will cause an assert to fire.

This change avoids merging same callee profile for duplicate callsites by filtering out callee profiles with a non-zero head sample count.

Reviewed By: wenlei, wmi

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




More information about the All-commits mailing list