summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-06-09 23:05:05 -0700
committerFangrui Song <i@maskray.me>2024-06-09 23:05:05 -0700
commit9d0754ada5dbbc0c009bcc2f7824488419cc5530 (patch)
tree8a31f077ffa3bd8ed235527c1f029bf9d776b7da /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentcb1a727dea9f063085db10190971dbd7aa7fb8e2 (diff)
[MC] Relax fragments eagerly
Lazy relaxation caused hash table lookups (`getFragmentOffset`) and complex use/compute interdependencies. Some expressions involding forward declared symbols (e.g. `subsection-if.s`) cannot be computed. Recursion detection requires complex `IsBeingLaidOut` (https://reviews.llvm.org/D79570). D76114's `invalidateFragmentsFrom` makes lazy relaxation even less useful. Switch to eager relaxation to greatly simplify code and resolve these issues. This change also removes a `getPrevNode` use, which makes it more feasible to replace the fragment representation, which might yield a large peak RSS win. Minor downsides: The number of section relaxations may increase (offset by avoiding the hash table lookup). For relax-recompute-align.s, the computed layout is not optimal.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions