diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-06-02 18:24:17 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-06-02 18:24:17 +0000 |
commit | 659b3bc77d8c7ad976b6976c93de94e11c0d69f2 (patch) | |
tree | db55d45605baacec29abafcbb176eef0aa2aa089 /llvm/test/ThinLTO | |
parent | 469014ada48d91d3f678a33fbc61d3314d44258d (diff) | |
download | bcm5719-llvm-659b3bc77d8c7ad976b6976c93de94e11c0d69f2.tar.gz bcm5719-llvm-659b3bc77d8c7ad976b6976c93de94e11c0d69f2.zip |
Move summary dead stripping before regular LTO.
This way dead stripping results are recorded in combined summary and
can be used in regular LTO passes.
Differential Revision: https://reviews.llvm.org/D33615
llvm-svn: 304577
Diffstat (limited to 'llvm/test/ThinLTO')
-rw-r--r-- | llvm/test/ThinLTO/X86/deadstrip.ll | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/llvm/test/ThinLTO/X86/deadstrip.ll b/llvm/test/ThinLTO/X86/deadstrip.ll index 0c85322eb56..c19ccb01be3 100644 --- a/llvm/test/ThinLTO/X86/deadstrip.ll +++ b/llvm/test/ThinLTO/X86/deadstrip.ll @@ -22,6 +22,20 @@ ; RUN: llvm-dis < %t.out.1.3.import.bc | FileCheck %s --check-prefix=CHECK2 ; RUN: llvm-nm %t.out.1 | FileCheck %s --check-prefix=CHECK2-NM +; RUN: llvm-bcanalyzer -dump %t.out.index.bc | FileCheck %s --check-prefix=COMBINED +; Live, NotEligibleForImport, Internal +; COMBINED-DAG: <COMBINED {{.*}} op2=55 +; Live, Internal +; COMBINED-DAG: <COMBINED {{.*}} op2=39 +; Live, External +; COMBINED-DAG: <COMBINED {{.*}} op2=32 +; COMBINED-DAG: <COMBINED {{.*}} op2=32 +; COMBINED-DAG: <COMBINED {{.*}} op2=32 +; (Dead) +; COMBINED-DAG: <COMBINED {{.*}} op2=0 +; COMBINED-DAG: <COMBINED {{.*}} op2=0 +; COMBINED-DAG: <COMBINED {{.*}} op2=0 + ; Dead-stripping on the index allows to internalize these, ; and limit the import of @baz thanks to early pruning. ; CHECK-NOT: available_externally {{.*}} @baz() @@ -35,7 +49,7 @@ ; Make sure we didn't internalize @boo, which is reachable via ; llvm.global_ctors ; CHECK2: define void @boo() -; We should have eventually revoved @baz since it was internalized and unused +; We should have eventually removed @baz since it was internalized and unused ; CHECK2-NM-NOT: _baz ; The final binary should not contain any of the dead functions, |