[all-commits] [llvm/llvm-project] 849b17: [DebugInfo][InstrRef] Avoid un-necessary densemap ...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Tue Oct 19 03:10:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 849b17949f18b5753592588a2290f2f3dde73ac0
      https://github.com/llvm/llvm-project/commit/849b17949f18b5753592588a2290f2f3dde73ac0
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2021-10-19 (Tue, 19 Oct 2021)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
    M llvm/unittests/CodeGen/InstrRefLDVTest.cpp

  Log Message:
  -----------
  [DebugInfo][InstrRef] Avoid un-necessary densemap copies and comparisons

This is purely a performance patch: InstrRefBasedLDV used to use three
DenseMaps to store variable values, two for long term storage and one as a
working set. This patch eliminates the working set, and updates the long
term storage in place, thus avoiding two DenseMap comparisons and two
DenseMap assignments, which can be expensive.

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




More information about the All-commits mailing list