[llvm] 8b445ab - [CodeGen] Fix performance regression introduced in b05101b

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 30 08:16:51 PDT 2025


Author: Alexander Richardson
Date: 2025-09-30T08:16:46-07:00
New Revision: 8b445ab68452fc81a1f0e662c11c3989ca98928c

URL: https://github.com/llvm/llvm-project/commit/8b445ab68452fc81a1f0e662c11c3989ca98928c
DIFF: https://github.com/llvm/llvm-project/commit/8b445ab68452fc81a1f0e662c11c3989ca98928c.diff

LOG: [CodeGen] Fix performance regression introduced in b05101b

The isNormalValueType = false flag was not set for this pseudo value
type, which caused significant size increases for some classes: the
size of the TargetLoweringBase class to 1.5 MB, because the size of
that class is quadratic in MVT::VALUETYPE_SIZE, and this commit
increased that from 256 to 504.

Reported by: abadams
Fixes: b05101b ("[TableGen, CodeGen, CHERI] Add support for the cPTR wildcard value type.")

Reviewed By: nikic

Pull Request: https://github.com/llvm/llvm-project/pull/161313

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/ValueTypes.td

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/ValueTypes.td b/llvm/include/llvm/CodeGen/ValueTypes.td
index 9ea127dd15943..300addd7d4daf 100644
--- a/llvm/include/llvm/CodeGen/ValueTypes.td
+++ b/llvm/include/llvm/CodeGen/ValueTypes.td
@@ -367,11 +367,11 @@ def aarch64mfp8 : ValueType<8,  253>;  // 8-bit value in FPR (AArch64)
 def c64 : VTCheriCapability<64, 254>;   // 64-bit CHERI capability value
 def c128 : VTCheriCapability<128, 255>; // 128-bit CHERI capability value
 
+let isNormalValueType = false in {
 // Pseudo valuetype mapped to the current CHERI capability pointer size.
 // Should only be used in TableGen.
 def cPTR : VTAny<503>;
 
-let isNormalValueType = false in {
 def token      : ValueType<0, 504>;  // TokenTy
 def MetadataVT : ValueType<0, 505> { // Metadata
   let LLVMName = "Metadata";


        


More information about the llvm-commits mailing list