[all-commits] [llvm/llvm-project] e15ae6: [LiveDebugVariables] Add cache for SkipPHIsLabelsA...

wmi-11 via All-commits all-commits at lists.llvm.org
Thu Jan 28 21:58:43 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e15ae67a0a7b32aef883b84e127295ce3f6e9226
      https://github.com/llvm/llvm-project/commit/e15ae67a0a7b32aef883b84e127295ce3f6e9226
  Author: Wei Mi <wmi at google.com>
  Date:   2021-01-28 (Thu, 28 Jan 2021)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugVariables.cpp

  Log Message:
  -----------
  [LiveDebugVariables] Add cache for SkipPHIsLabelsAndDebug to prevent
iterating the same PHI/LABEL/Debug instructions repeatedly.

We run into a compiling timeout problem when building a target after its
SampleFDO profile is updated. It is because some very large blocks with
a bunch of PHIs at the beginning. LiveDebugVariables::emitDebugValues
called during VirtRegRewriter phase searchs the insertion point for those
large BBs repeatedly in SkipPHIsLabelsAndDebug, and each time
SkipPHIsLabelsAndDebug needs to go through the same set of PHIs before it
can find the first non PHI/Label/Debug instruction. This patch adds a cache
to save the last position for the sequence which has been checked in the
previous call of SkipPHIsLabelsAndDebug.

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




More information about the All-commits mailing list