1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
llvm-mirror/test/Transforms/FunctionImport/funcimport_alias.ll
Mehdi Amini 26210a7e70 ThinLTO: use the callgraph from the combined index to drive the FunctionImporter
Summary:
Now that the summary contains the full reference/call graph, we can
replace the existing function importer that loads and inspect the IR
to iteratively walk the call graph by a traversal based purely on the
summary information. Decouple the actual importing decision from any
IR manipulation.

Reviewers: tejohnson

Subscribers: llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D18343

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264503
2016-03-26 05:40:34 +00:00

26 lines
759 B
LLVM

; Do setup work for all below tests: generate bitcode and combined index
; RUN: llvm-as -module-summary %s -o %t.bc
; RUN: llvm-as -module-summary %p/Inputs/funcimport_alias.ll -o %t2.bc
; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc
; Do the import now. Ensures that the importer handles an external call
; from imported callanalias() to a function that is defined already in
; the dest module, but as an alias.
; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -S | FileCheck %s
define i32 @main() #0 {
entry:
call void @callanalias()
ret i32 0
}
@analias = alias void (), void ()* @globalfunc
define void @globalfunc() #0 {
entry:
ret void
}
declare void @callanalias() #1
; CHECK-DAG: define available_externally void @callanalias()