[llvm] [MC] Reduce size of MCLEBFragment (NFC) (PR #75050)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 11 06:07:14 PST 2023
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/75050
This recovers more of the max-rss regression introduced by https://reviews.llvm.org/D157657.
Per http://llvm-compile-time-tracker.com/compare.php?from=dd32d26a37e22a3bce15ed8c21145b17ff5e1401&to=b4d4aba0dfbbe405f4da3494575434710f4ec9b9&stat=max-rss&linkStats=on this is an about 1.2% max-rss improvement for the LTO link stage with debuginfo.
>From 5b5b40d221dfb72538934932d0004f8a7f198500 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Mon, 11 Dec 2023 15:02:02 +0100
Subject: [PATCH] [MC] Reduce size of MCLEBFragment (NFC)
This recovers more of the max-rss regression introduced by
https://reviews.llvm.org/D157657.
---
llvm/include/llvm/MC/MCFragment.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/include/llvm/MC/MCFragment.h b/llvm/include/llvm/MC/MCFragment.h
index c314fdd3aa697..a9b19dc56f16a 100644
--- a/llvm/include/llvm/MC/MCFragment.h
+++ b/llvm/include/llvm/MC/MCFragment.h
@@ -428,7 +428,7 @@ class MCOrgFragment : public MCFragment {
}
};
-class MCLEBFragment final : public MCEncodedFragmentWithFixups<10, 1> {
+class MCLEBFragment final : public MCEncodedFragmentWithFixups<8, 0> {
/// True if this is a sleb128, false if uleb128.
bool IsSigned;
@@ -437,7 +437,7 @@ class MCLEBFragment final : public MCEncodedFragmentWithFixups<10, 1> {
public:
MCLEBFragment(const MCExpr &Value, bool IsSigned, MCSection *Sec = nullptr)
- : MCEncodedFragmentWithFixups<10, 1>(FT_LEB, false, Sec),
+ : MCEncodedFragmentWithFixups<8, 0>(FT_LEB, false, Sec),
IsSigned(IsSigned), Value(&Value) {
getContents().push_back(0);
}
More information about the llvm-commits
mailing list