[all-commits] [llvm/llvm-project] 91fb66: [DebugInfo][InstrRef][NFC] Don't build a map of un...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Tue Feb 1 10:58:31 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 91fb66cf91ae557d45bde7931cbb364f1c08d245
      https://github.com/llvm/llvm-project/commit/91fb66cf91ae557d45bde7931cbb364f1c08d245
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

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

  Log Message:
  -----------
  [DebugInfo][InstrRef][NFC] Don't build a map of un-needed values

When finding locations for variable values at the start of a block, we
build a large map of every value to every location, and then pick out the
locations for values that are desired. This takes up quite a lot of time,
because, unsurprisingly, there are usually more values in registers and
stack slots than there are variables.

This patch instead creates a map of desired values to their locations,
which are initially illegal locations. Then, as we examine every available
value, we can select locations for values we care about, and ignore those
that we don't. This substantially reduces the amount of work done (i.e.,
building a map up of values to locations that nothing wants or needs).

Geomean performance improvement of 1% on CTMark, woo.

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




More information about the All-commits mailing list