diff options
author | Teresa Johnson <tejohnson@google.com> | 2017-07-17 19:25:38 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2017-07-17 19:25:38 +0000 |
commit | f9dc3deaa6ff46aee8adf5f7f38a94daf904c21d (patch) | |
tree | 76cfa6403a7572e3f88a0403540538416e584e3d /llvm/test/Transforms | |
parent | 7873d822f79b8cde7642cf94b8c7d68223f5404b (diff) | |
download | bcm5719-llvm-f9dc3deaa6ff46aee8adf5f7f38a94daf904c21d.tar.gz bcm5719-llvm-f9dc3deaa6ff46aee8adf5f7f38a94daf904c21d.zip |
Revert "Restore with fix "[ThinLTO] Ensure we always select the same function copy to import""
This reverts commit r308114 (and follow on fixes to test).
There is a linking failure in a ThinLTO bot:
http://green.lab.llvm.org/green/job/clang-stage2-configure-Rthinlto_build/3663/
(and undefined reference). It seems like it must be a second order
effect of the heuristic change I made, and may take some time to try
to reproduce locally and track down. Therefore, reverting for now.
llvm-svn: 308206
Diffstat (limited to 'llvm/test/Transforms')
3 files changed, 0 insertions, 88 deletions
diff --git a/llvm/test/Transforms/FunctionImport/Inputs/funcimport_resolved1.ll b/llvm/test/Transforms/FunctionImport/Inputs/funcimport_resolved1.ll deleted file mode 100644 index 2b2443c96af..00000000000 --- a/llvm/test/Transforms/FunctionImport/Inputs/funcimport_resolved1.ll +++ /dev/null @@ -1,34 +0,0 @@ -target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-apple-macosx10.11.0" - -define void @foo() { - call void @linkonceodrfunc() - call void @linkonceodrfunc2() - ret void -} - -define linkonce_odr void @linkonceodrfunc() { - call void @f() - call void @f() - call void @f() - call void @f() - call void @f() - call void @f() - call void @f() - ret void -} - -define linkonce_odr void @linkonceodrfunc2() { - call void @f() - call void @f() - call void @f() - call void @f() - call void @f() - call void @f() - call void @f() - ret void -} - -define internal void @f() { - ret void -} diff --git a/llvm/test/Transforms/FunctionImport/Inputs/funcimport_resolved2.ll b/llvm/test/Transforms/FunctionImport/Inputs/funcimport_resolved2.ll deleted file mode 100644 index 278a7f4553f..00000000000 --- a/llvm/test/Transforms/FunctionImport/Inputs/funcimport_resolved2.ll +++ /dev/null @@ -1,6 +0,0 @@ -target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-apple-macosx10.11.0" - -define linkonce_odr void @linkonceodrfunc() { - ret void -} diff --git a/llvm/test/Transforms/FunctionImport/funcimport_resolved.ll b/llvm/test/Transforms/FunctionImport/funcimport_resolved.ll deleted file mode 100644 index ebf5fd3b055..00000000000 --- a/llvm/test/Transforms/FunctionImport/funcimport_resolved.ll +++ /dev/null @@ -1,48 +0,0 @@ -; Test to ensure that we always select the same copy of a linkonce function -; when it is encountered with different thresholds. Initially, we will encounter -; the copy in funcimport_resolved1.ll with a lower threshold by reaching it -; from the deeper call chain via foo(), and it won't be selected for importing. -; Later we encounter it with a higher threshold via the direct call from main() -; and it will be selected. We don't want to select both the copy from -; funcimport_resolved1.ll and the smaller one from funcimport_resolved2.ll, -; leaving it up to the backend to figure out which one to actually import. -; The linkonce_odr may have different instruction counts in practice due to -; different inlines in the compile step. - -; Require asserts so we can use -debug-only -; REQUIRES: asserts - -; REQUIRES: x86-registered-target - -; RUN: opt -module-summary %s -o %t.bc -; RUN: opt -module-summary %p/Inputs/funcimport_resolved1.ll -o %t2.bc -; RUN: opt -module-summary %p/Inputs/funcimport_resolved2.ll -o %t3.bc - -; First do a sanity check that all callees are imported with the default -; instruction limit -; RUN: llvm-lto2 run %t.bc %t2.bc %t3.bc -o %t4 -r=%t.bc,_main,pl -r=%t.bc,_linkonceodrfunc,l -r=%t.bc,_foo,l -r=%t2.bc,_foo,pl -r=%t2.bc,_linkonceodrfunc,pl -r=%t2.bc,_linkonceodrfunc2,pl -r=%t3.bc,_linkonceodrfunc,l -thinlto-threads=1 -debug-only=function-import 2>&1 | FileCheck %s --check-prefix=INSTLIMDEFAULT -; INSTLIMDEFAULT-DAG: Is importing function {{.*}} foo from {{.*}}funcimport_resolved1.ll -; INSTLIMDEFAULT-DAG: Is importing function {{.*}} linkonceodrfunc from {{.*}}funcimport_resolved1.ll -; INSTLIMDEFAULT-DAG: Is importing function {{.*}} linkonceodrfunc2 from {{.*}}funcimport_resolved1.ll -; INSTLIMDEFAULT-DAG: Is importing function {{.*}} f from {{.*}}funcimport_resolved1.ll - -; Now run with the lower threshold that will only allow linkonceodrfunc to be -; imported from funcimport_resolved1.ll the second time it is encountered. -; RUN: llvm-lto2 run %t.bc %t2.bc %t3.bc -o %t4 -r=%t.bc,_main,pl -r=%t.bc,_linkonceodrfunc,l -r=%t.bc,_foo,l -r=%t2.bc,_foo,pl -r=%t2.bc,_linkonceodrfunc,pl -r=%t2.bc,_linkonceodrfunc2,pl -r=%t3.bc,_linkonceodrfunc,l -thinlto-threads=1 -debug-only=function-import -import-instr-limit=8 2>&1 | FileCheck %s --check-prefix=INSTLIM8 -; INSTLIM8-DAG: Is importing function {{.*}} foo from {{.*}}funcimport_resolved1.ll -; INSTLIM8-DAG: Is importing function {{.*}} linkonceodrfunc from {{.*}}funcimport_resolved1.ll -; INSTLIM8-DAG: Not importing function {{.*}} linkonceodrfunc2 from {{.*}}funcimport_resolved1.ll -; INSTLIM8-DAG: Is importing function {{.*}} f from {{.*}}funcimport_resolved1.ll - -target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-apple-macosx10.11.0" - -define i32 @main() #0 { -entry: - call void (...) @foo() - call void (...) @linkonceodrfunc() - ret i32 0 -} - -declare void @foo(...) #1 -declare void @linkonceodrfunc(...) #1 |