[all-commits] [llvm/llvm-project] fd75ad: [MBFIWrapper] Add a new function getBlockProfileCount

weiguozhi via All-commits all-commits at lists.llvm.org
Wed Sep 23 09:32:15 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fd75ad86624eaebf21e544335ea28f12e54a5ec1
      https://github.com/llvm/llvm-project/commit/fd75ad86624eaebf21e544335ea28f12e54a5ec1
  Author: Guozhi Wei <carrot at google.com>
  Date:   2020-09-23 (Wed, 23 Sep 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/MBFIWrapper.h
    M llvm/lib/CodeGen/MBFIWrapper.cpp
    M llvm/lib/CodeGen/MachineBlockPlacement.cpp

  Log Message:
  -----------
  [MBFIWrapper] Add a new function getBlockProfileCount

MBFIWrapper keeps track of block frequencies of newly created blocks and
modified blocks, modified block frequencies should also impact block profile
count. This class doesn't provide interface getBlockProfileCount, users can only
use the underlying MBFI to query profile count, the underlying MBFI doesn't know
the modifications made in MBFIWrapper, so it either provides stale profile count
for modified block or simply crashes on new blocks.

So this patch add function getBlockProfileCount to class MBFIWrapper to handle
new blocks or modified blocks.

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




More information about the All-commits mailing list