[all-commits] [llvm/llvm-project] 550ab5: [NFC] Fix performance issue in LiveDebugVariables

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Thu Apr 2 01:57:48 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 550ab58bc106335f8dcbc1767548a55c7151f87a
      https://github.com/llvm/llvm-project/commit/550ab58bc106335f8dcbc1767548a55c7151f87a
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2020-04-02 (Thu, 02 Apr 2020)

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

  Log Message:
  -----------
  [NFC] Fix performance issue in LiveDebugVariables

When compiling AMDGPUDisassembler.cpp in a stage 1 trunk build with
CMAKE_BUILD_TYPE=RelWithDebInfo LLVM_USE_SANITIZER=Address LiveDebugVariables
accounts for 21.5% wall clock time. This fix reduces that to 1.2% by switching
out a linked list lookup with a map lookup.

Note that the linked list is still used to group UserValues by vreg. The vreg
lookups don't cause any problems in this pathological case.

This is the same idea as D68816, which was reverted, except that it is a less
intrusive fix.

Reviewed By: vsk

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




More information about the All-commits mailing list