summaryrefslogtreecommitdiffstats
path: root/llvm/test/LTO/X86/parallel.ll
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-08-27 23:37:36 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-08-27 23:37:36 +0000
commitc269ed511584d9044a4e28a25fa6a0d24df68a9f (patch)
treeeb8ec1c70b5fc9d78ab61aacaffab6d9ab1bb16d /llvm/test/LTO/X86/parallel.ll
parent0e2882345daead6cd9368eda4107e860d9141e35 (diff)
downloadbcm5719-llvm-c269ed511584d9044a4e28a25fa6a0d24df68a9f.tar.gz
bcm5719-llvm-c269ed511584d9044a4e28a25fa6a0d24df68a9f.zip
CodeGen: Introduce splitCodeGen and teach LTOCodeGenerator to use it.
llvm::splitCodeGen is a function that implements the core of parallel LTO code generation. It uses llvm::SplitModule to split the module into linkable partitions and spawning one code generation thread per partition. The function produces multiple object files which can be linked in the usual way. This has been threaded through to LTOCodeGenerator (and llvm-lto for testing purposes). Separate patches will add parallel LTO support to the gold plugin and lld. Differential Revision: http://reviews.llvm.org/D12260 llvm-svn: 246236
Diffstat (limited to 'llvm/test/LTO/X86/parallel.ll')
-rw-r--r--llvm/test/LTO/X86/parallel.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/LTO/X86/parallel.ll b/llvm/test/LTO/X86/parallel.ll
new file mode 100644
index 00000000000..15e89ea59a5
--- /dev/null
+++ b/llvm/test/LTO/X86/parallel.ll
@@ -0,0 +1,22 @@
+; RUN: llvm-as -o %t.bc %s
+; RUN: llvm-lto -exported-symbol=foo -exported-symbol=bar -j2 -o %t.o %t.bc
+; RUN: llvm-nm %t.o.0 | FileCheck --check-prefix=CHECK0 %s
+; RUN: llvm-nm %t.o.1 | FileCheck --check-prefix=CHECK1 %s
+
+target triple = "x86_64-unknown-linux-gnu"
+
+; CHECK0-NOT: bar
+; CHECK0: T foo
+; CHECK0-NOT: bar
+define void @foo() {
+ call void @bar()
+ ret void
+}
+
+; CHECK1-NOT: foo
+; CHECK1: T bar
+; CHECK1-NOT: foo
+define void @bar() {
+ call void @foo()
+ ret void
+}
OpenPOWER on IntegriCloud