From 82a8e819ac25126c8b29d9b3c929ef6d714447ae Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 25 Feb 2016 20:15:40 +0000 Subject: [PATCH] transforms.llvm_ir_generator: use private linkage instead of internal. This reduces the size of symbol tables (internal adds an STB_LOCAL symbol, but private doesn't). --- artiq/compiler/transforms/llvm_ir_generator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/artiq/compiler/transforms/llvm_ir_generator.py b/artiq/compiler/transforms/llvm_ir_generator.py index 6f8e0633a..0c0d532cd 100644 --- a/artiq/compiler/transforms/llvm_ir_generator.py +++ b/artiq/compiler/transforms/llvm_ir_generator.py @@ -485,7 +485,7 @@ class LLVMIRGenerator: ]) llrpcattr.global_constant = True llrpcattr.unnamed_addr = True - llrpcattr.linkage = 'internal' + llrpcattr.linkage = 'private' return llrpcattr @@ -499,14 +499,14 @@ class LLVMIRGenerator: llrpcattrs + [ll.Constant(llrpcattrty.as_pointer(), None)]) llrpcattrary.global_constant = True llrpcattrary.unnamed_addr = True - llrpcattrary.linkage = 'internal' + llrpcattrary.linkage = 'private' llobjectaryty = ll.ArrayType(llptr, len(llobjects[typ]) + 1) llobjectary = ll.GlobalVariable(self.llmodule, llobjectaryty, name="objects.{}".format(type_name)) llobjectary.initializer = ll.Constant(llobjectaryty, llobjects[typ] + [ll.Constant(llptr, None)]) - llobjectary.linkage = 'internal' + llobjectary.linkage = 'private' lldesc = ll.GlobalVariable(self.llmodule, lldescty, name="desc.{}".format(type_name)) @@ -515,7 +515,7 @@ class LLVMIRGenerator: llobjectary.bitcast(llptr.as_pointer()) ]) lldesc.global_constant = True - lldesc.linkage = 'internal' + lldesc.linkage = 'private' lldescs.append(lldesc) llglobaldescty = ll.ArrayType(lldescty.as_pointer(), len(lldescs) + 1) @@ -529,7 +529,7 @@ class LLVMIRGenerator: self.llfunction = self.map(func) if func.is_internal: - self.llfunction.linkage = 'internal' + self.llfunction.linkage = 'private' self.llfunction.attributes.add('uwtable')