Branch: refs/heads/bbiiggppiigg/parallel-liveness
Home: https://github.com/dyninst/dyninst
Commit: 4615247f6fc185efbbbde69bc01b146b94cb9294
https://github.com/dyninst/dyninst/commit/4615247f6fc185efbbbde69bc01b146b94cb9294
Author: wuxx1279 <bbiiggppiigg@xxxxxxxxx>
Date: 2026-06-12 (Fri, 12 Jun 2026)
Changed paths:
M dataflowAPI/h/liveness.h
M dataflowAPI/src/liveness.C
M dyninstAPI/CMakeLists.txt
M dyninstAPI/src/addressSpace.C
M dyninstAPI/src/patching/instPoint.C
M dyninstAPI/src/patching/instPoint.h
Log Message:
-----------
dyninstAPI: parallel liveness pre-warm before code generation
With liveness analysis on, register liveness is otherwise computed lazily and
serially at code-generation time -- by both the coverage trampolines and the
relocation widgets (e.g. RelDataPatch for PC-relative fixups, created during
relocation) -- each via LivenessAnalyzer::analyze(F) on the shared analyzer.
That per-function analysis dominates rewrite time on a large binary.
Liveness is per-function and intraprocedural (call sites use ABI conventions,
no callee recursion), so analyze every function in parallel before
generateCode() and warm the *shared* analyzer that instPoint::liveRegisters()
reads:
- instPoint::livenessAnalyzer(width): expose the process-global per-width
analyzers (was a function-local static), so the pre-warm populates the same
instance code generation reads.
- LivenessAnalyzer::absorb(): merge another analyzer's per-function caches
(blockLiveInfo/liveFuncCalculated/funcRegsDefined). Shared blocks carry equal
values, so keep-either is correct.
- AddressSpace::relocateInt: before generateCode(), each thread analyzes a slice
of the functions into its own analyzer (no shared analyzer state during
analysis; CFG reads are block-locked, ABI singleton warmed serially first),
then merges into the shared analyzer under a critical section.
- instPoint::fillLiveRegisters(LivenessAnalyzer*): split out of liveRegisters()
(idempotent via the liveRegs_ cache).
- CMakeLists: add OpenMP::OpenMP_CXX to dyninstAPI (as symtabAPI/parseAPI do).
Pure cache warm-up: results match the serial path, and any function not warmed
is still analyzed on demand at code-gen time. Code generation then finds
analyze(F) cached for every liveness query -- coverage and relocation alike.
Co-Authored-By: Claude Opus 4.8 <noreply@xxxxxxxxxxxxx>
To unsubscribe from these emails, change your notification settings at https://github.com/dyninst/dyninst/settings/notifications
|