aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
diff options
context:
space:
mode:
authorOCHyams <orlando.hyams@sony.com>2023-03-29 15:27:29 +0100
committerOCHyams <orlando.hyams@sony.com>2023-03-29 15:59:46 +0100
commitd4879d769095d76ddf9484c50661feac96ce525a (patch)
tree2985d0abfedd043447248a4ad549f8b4add1b1d8 /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
parent8e56a196fb5c26e556ac267986868a3f63b7c486 (diff)
downloadllvm-d4879d769095d76ddf9484c50661feac96ce525a.zip
llvm-d4879d769095d76ddf9484c50661feac96ce525a.tar.gz
llvm-d4879d769095d76ddf9484c50661feac96ce525a.tar.bz2
[Assignment Tracking] Coalesce dbg loc definitions with contiguous fragments
MemLocFragmentFill uses an IntervalMap to track which bits of each variable are stack-homed. Intervals with the same value (same stack location base address) are automatically coalesced by the map. This patch changes the analysis to take advantage of that and insert a new dbg loc after each def if any coalescing took place. This results in some additional redundant defs (we insert a def, then another that by definition shadows the previous one if any coalescing took place) but they're all cleaned up thanks to the previous patch in this stack. This reduces the total number of fragments created by AssignmentTrackingAnalysis which reduces compile time because LiveDebugValues computes SSA for every fragment it encounters. There's a geomean reduction in instructions retired in a CTMark LTO-O3-g build of 0.3% with these two patches. One small caveat is that this technique can produce partially overlapping fragments (e.g. slice [0, 32) and slice [16, 64)), which we know LiveDebugVariables doesn't really handle correctly. Used in combination with instruction-referencing this isn't a problem, since LiveDebugVariables is effectively side-stepped in instruction-referencing mode. Given this, the coalescing is only enabled when instruction-referencing is enabled (but the behaviour can be overriden using -debug-ata-coalesce-frags=<bool>). Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D146980
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
0 files changed, 0 insertions, 0 deletions