[llvm] 41aa0d4 - [MC] Reduce size of MCLEBFragment (NFC) (#75050)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 00:56:09 PST 2023


Author: Nikita Popov
Date: 2023-12-13T09:56:05+01:00
New Revision: 41aa0d4690a25366a5acbd4f3cbc94ca89176dfe

URL: https://github.com/llvm/llvm-project/commit/41aa0d4690a25366a5acbd4f3cbc94ca89176dfe
DIFF: https://github.com/llvm/llvm-project/commit/41aa0d4690a25366a5acbd4f3cbc94ca89176dfe.diff

LOG: [MC] Reduce size of MCLEBFragment (NFC) (#75050)

This recovers more of the max-rss regression introduced by
https://reviews.llvm.org/D157657.

This is an about 1.2% max-rss improvement for the LTO link stage with
debuginfo on CTMark.

Added: 
    

Modified: 
    llvm/include/llvm/MC/MCFragment.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/MC/MCFragment.h b/llvm/include/llvm/MC/MCFragment.h
index c314fdd3aa6973..a9b19dc56f16a5 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