[all-commits] [llvm/llvm-project] a80181: [DebugInfo][InstrRef][NFC] Free resources at an ea...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Wed Feb 2 04:58:45 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a80181a81ea44215e49e5da1457614ec0bd44111
https://github.com/llvm/llvm-project/commit/a80181a81ea44215e49e5da1457614ec0bd44111
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] Free resources at an earlier stage
This patch releases some memory from InstrRefBasedLDV earlier that it would
otherwise. The underlying problem is:
* We store a big table of "live in values for each block",
* We translate that into DBG_VALUE instructions in each block,
And both exist in memory at the same time, which needlessly doubles that
information. The most of what this patch does is: as we progressively
translate live-in information into DBG_VALUEs, we free the variable-value /
machine-value tracking information as we go, which significantly reduces
peak memory.
While I'm here, also add a clear method to wipe variable assignments that
have been accumulated into VLocTracker objects, and turn a DenseMap into
a SmallDenseMap to avoid an initial allocation.
Differential Revision: https://reviews.llvm.org/D118453
More information about the All-commits
mailing list