diff options
author | Sean Fertile <sfertile@ca.ibm.com> | 2017-11-04 17:04:39 +0000 |
---|---|---|
committer | Sean Fertile <sfertile@ca.ibm.com> | 2017-11-04 17:04:39 +0000 |
commit | dcf1ffe8a0867a311092f2379195e9b646e42c1d (patch) | |
tree | 82a26bc93db02b7266c4719fce963852d22b8406 /test/Bitcode | |
parent | ce4da272347af8a89a8f2dc388565527a22aa75c (diff) |
[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.
Now that we have a way to mark GlobalValues as local we can use the symbol
resolutions that the linker plugin provides as part of lto/thinlto link
step to refine the compilers view on what symbols will end up being local.
Originally commited as r317374, but reverted in r317395 to update some missed
tests.
Differential Revision: https://reviews.llvm.org/D35702
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bitcode')
-rw-r--r-- | test/Bitcode/thinlto-summary-local-5.0.ll | 22 | ||||
-rw-r--r-- | test/Bitcode/thinlto-summary-local-5.0.ll.bc | bin | 0 -> 1028 bytes |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/Bitcode/thinlto-summary-local-5.0.ll b/test/Bitcode/thinlto-summary-local-5.0.ll new file mode 100644 index 000000000000..cbc48d23df3c --- /dev/null +++ b/test/Bitcode/thinlto-summary-local-5.0.ll @@ -0,0 +1,22 @@ +; Bitcode compatibility test for dso_local flag in thin-lto summaries. +; Checks that older bitcode summaries without the dso_local op are still +; properly parsed and don't set GlobalValues as dso_local. + +; RUN: llvm-dis < %s.bc | FileCheck %s +; RUN: llvm-bcanalyzer -dump %s.bc | FileCheck %s --check-prefix=BCAN + +define void @foo() { +;CHECK-DAG:define void @foo() + ret void +} + +@bar = global i32 0 +;CHECK-DAG: @bar = global i32 0 + +@baz = alias i32, i32* @bar +;CHECK-DAG: @bar = global i32 0 + +;BCAN: <SOURCE_FILENAME +;BCAN-NEXT: <GLOBALVAR {{.*}} op7=0/> +;BCAN-NEXT: <FUNCTION {{.*}} op16=0/> +;BCAN-NEXT: <ALIAS {{.*}} op9=0/> diff --git a/test/Bitcode/thinlto-summary-local-5.0.ll.bc b/test/Bitcode/thinlto-summary-local-5.0.ll.bc Binary files differnew file mode 100644 index 000000000000..8dc7ca0a74b7 --- /dev/null +++ b/test/Bitcode/thinlto-summary-local-5.0.ll.bc |