http://llvm.org/bugs/show_bug.cgi?id=11367
Bug #: 11367
Summary: [regression] missed LTO oportunity
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Linker
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
given 3 IL files:
test1.ll:
--------------------
define i32 @f() {
entry:
ret i32 42
}
-------------------
test2.ll:
-------------------------------
define available_externally i32 @g() {
entry:
ret i32 42
}
------------------------------
test3.ll:
------------------------------
define i32 @h() {
entry:
%call = tail call i32 @g()
ret i32 %call
}
declare i32 @g()
-----------------------------
if we link and optimized them with
$ llvm-link test1.ll test2.ll test3.ll -o all.bc
$ opt -std-link-opts all.bc -o opt.ll -S
we get:
---------------------------------------
define i32 @f() nounwind readnone {
entry:
ret i32 42
}
define i32 @h() {
entry:
%call = tail call i32 @g()
ret i32 %call
}
declare i32 @g()
------------------------------------
with 9af37a3de8c8688adae383471379f0216287ce28 (143524) reverted, we get:
-----------------------------------
define i32 @f() nounwind readnone {
entry:
ret i32 42
}
define i32 @h() nounwind readnone {
entry:
ret i32 42
}
---------------------------------
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs