[all-commits] [llvm/llvm-project] d556eb: [DebugInfo][InstrRef][NFC] Cache some PHI resolutions

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Feb 2 04:22:10 PST 2022


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

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

  Log Message:
  -----------
  [DebugInfo][InstrRef][NFC] Cache some PHI resolutions

Install a cache of DBG_INSTR_REF -> ValueIDNum resolutions, for scenarios
where the value has to be reconstructed from several DBG_PHIs. Whenever
this happens, it's because branch folding + tail duplication has messed
with the SSA form of the program, and we have to solve a mini SSA problem
to find the variable value. This is always called twice, so it makes sense
to cache the value.

This gives a ~0.5% geomean compile-time-performance improvement on CTMark.

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




More information about the All-commits mailing list