[all-commits] [llvm/llvm-project] d69c23: [NFC][Debug] Fix unnecessary deep-copy for vector ...

QingShan Zhang via All-commits all-commits at lists.llvm.org
Sun Apr 11 23:58:34 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d69c236e1d6b4705d3a0041f39bfe864638eb24e
      https://github.com/llvm/llvm-project/commit/d69c236e1d6b4705d3a0041f39bfe864638eb24e
  Author: Zhang Qing Shan <zhangqingshan.zll at bytedance.com>
  Date:   2021-04-12 (Mon, 12 Apr 2021)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

  Log Message:
  -----------
  [NFC][Debug] Fix unnecessary deep-copy for vector to save compiling time

We saw some big compiling time impact after enabling the debug entry value
feature for X86 platform(D73534). Compiling time goes from 900s->1600s with
our testcase. It is caused by allocating/freeing the memory busily.

'using FwdRegWorklist = MapVector<unsigned, SmallVector<FwdRegParamInfo, 2>>;'
The value for this map is vector, and we miss the reference when access the
element. The same happens for `auto CalleesMap = MF->getCallSitesInfo();` which is a DenseMap.

Reviewed by: djtodoro, flychen50

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




More information about the All-commits mailing list