[llvm] [RISC-V] Add SMLoc info for fixup. [NFCI] (PR #142054)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 21:16:40 PDT 2025


MaskRay wrote:

I actually plan to remove SMLoc from MCFixup to reduce its size, as the SMLoc can typically be retrieved from `MCExpr *MCFixup::Value`.

I also considered removing SMLoc from MCExpr.  https://llvm-compile-time-tracker.com/compare.php?from=193135c80019a01e08014b5727088b860a09f493&to=b8a413de2798260fabf6b5650fc22c803fa13831&stat=max-rss&linkStats=on

The saving is actually quite decent for a -g build, but some folks might need the MCExpr loc.

<h4 style="font-family: monospace; color: rgb(0, 0, 0); font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">stage1-ReleaseLTO-g (link only):</h4>
Benchmark | Old | New
-- | -- | --
kimwitu++ | 248MiB | 242MiB (-2.52%)
sqlite3 | 221MiB | 216MiB (-2.43%)
consumer-typeset | 162MiB | 158MiB (-2.26%)
Bullet | 208MiB | 204MiB (-1.81%)
tramp3d-v4 | 624MiB | 616MiB (-1.32%)
mafft | 122MiB | 123MiB (+1.08%)
ClamAV | 230MiB | 224MiB (-2.61%)
lencod | 277MiB | 270MiB (-2.63%)
SPASS | 289MiB | 284MiB (-1.67%)
7zip | 467MiB | 454MiB (-2.84%)
geomean | 256MiB | 251MiB (-1.91%)

<br class="Apple-interchange-newline">


https://github.com/llvm/llvm-project/pull/142054


More information about the llvm-commits mailing list