mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-03 17:31:50 +00:00
bbf2e449fd
Keeping as much as possible internal/private is known to help the optimizer. Let's try to benefit from this in ThinLTO. Note: this is early work, but is enough to build clang (and all the LLVM tools). I still need to write some lit-tests... Differential Revision: http://reviews.llvm.org/D19103 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267317 91177308-0d34-0410-b5e6-96231b3b80d8
19 lines
713 B
LLVM
19 lines
713 B
LLVM
;; RUN: opt -module-summary %s -o %t1.bc
|
|
; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t1.bc
|
|
; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t.index.bc %t1.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=REGULAR
|
|
; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t.index.bc %t1.bc -o - --exported-symbol=foo | llvm-dis -o - | FileCheck %s --check-prefix=INTERNALIZE
|
|
|
|
; REGULAR: define void @foo
|
|
; REGULAR: define void @bar
|
|
; INTERNALIZE: define void @foo
|
|
; INTERNALIZE: define internal void @bar
|
|
|
|
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() {
|
|
ret void
|
|
}
|
|
define void @bar() {
|
|
ret void
|
|
} |