From 7301a76d680533e90468fe54941ea68b3de17844 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 21 Jul 2015 17:10:31 +0300 Subject: [PATCH] Mark string constants as unnamed_addr. As a result they will be merged when possible. --- artiq/compiler/transforms/llvm_ir_generator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/artiq/compiler/transforms/llvm_ir_generator.py b/artiq/compiler/transforms/llvm_ir_generator.py index 717c2f169..49859355a 100644 --- a/artiq/compiler/transforms/llvm_ir_generator.py +++ b/artiq/compiler/transforms/llvm_ir_generator.py @@ -83,6 +83,7 @@ class LLVMIRGenerator: llconst = ll.GlobalVariable(self.llmodule, llstrty, name=self.llmodule.get_unique_name("str")) llconst.global_constant = True + llconst.unnamed_addr = True llconst.initializer = ll.Constant(llstrty, bytearray(as_bytes)) return llconst.bitcast(ll.IntType(8).as_pointer()) else: