diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-10-21 17:14:55 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-10-21 17:14:55 +0000 |
commit | 713cab059ebb67c2f51d8da9d8e57be2b1dcd9c2 (patch) | |
tree | c92ff5eac147f406e87b6e2cb43543d6e5b37f11 /test/LTO/cfi_endproc.ll | |
parent | da39dd30ad3c969be3ac843307d4630807699538 (diff) | |
download | llvm-713cab059ebb67c2f51d8da9d8e57be2b1dcd9c2.tar.gz llvm-713cab059ebb67c2f51d8da9d8e57be2b1dcd9c2.tar.bz2 llvm-713cab059ebb67c2f51d8da9d8e57be2b1dcd9c2.tar.xz |
Optimize more linkonce_odr values during LTO.
When a linkonce_odr value that is on the dso list is not unnamed_addr
we can still look to see if anything is actually using its address. If
not, it is safe to hide it.
This patch implements that by moving GlobalStatus to Transforms/Utils
and using it in Internalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/LTO/cfi_endproc.ll')
-rw-r--r-- | test/LTO/cfi_endproc.ll | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/LTO/cfi_endproc.ll b/test/LTO/cfi_endproc.ll index d8818d226e..a5cc649fc8 100644 --- a/test/LTO/cfi_endproc.ll +++ b/test/LTO/cfi_endproc.ll @@ -29,6 +29,9 @@ define i32 @main(i32 %argc, i8** %argv) { ; RUN: llvm-nm %t | FileCheck %s -check-prefix=ZED1_AND_ZED2 ; ZED1_AND_ZED2: V zed1 @zed1 = linkonce_odr global i32 42 +define i32* @get_zed1() { + ret i32* @zed1 +} ; ZED1_AND_ZED2: d zed2 @zed2 = linkonce_odr unnamed_addr global i32 42 |