nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 28 lines 1.2 kB view raw
1From a57eb548d46a37e4aed33eefccc9e6374b579ff9 Mon Sep 17 00:00:00 2001 2From: Luna Nova <git@lunnova.dev> 3Date: Mon, 16 Dec 2024 13:58:54 -0800 4Subject: [PATCH] [AMDGPU] TargetMachine: increase NameString size to 256 5 6128 is too small a default for compilers used to build 7AMD's rocBLAS, composable_kernel and similar libs because 8they use very long symbol names such as 9device_gemm_xdl_universal_bf16_bf16_bf16_mk_nk_mn_comp_default_instance 10 11This fixes spending ~10% of compile time in malloc inside this function. 12--- 13 llvm/lib/Target/TargetMachine.cpp | 2 +- 14 1 file changed, 1 insertion(+), 1 deletion(-) 15 16diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp 17index abd0fdf2390c0..86ce468b75643 100644 18--- a/lib/Target/TargetMachine.cpp 19+++ b/lib/Target/TargetMachine.cpp 20@@ -270,7 +270,7 @@ MCSymbol *TargetMachine::getSymbol(const GlobalValue *GV) const { 21 if (MCSymbol *TargetSymbol = TLOF->getTargetSymbol(GV, *this)) 22 return TargetSymbol; 23 24- SmallString<128> NameStr; 25+ SmallString<256> NameStr; 26 getNameWithPrefix(NameStr, GV, TLOF->getMangler()); 27 return TLOF->getContext().getOrCreateSymbol(NameStr); 28 }