[LLVMbugs] [Bug 11367] New: [regression] missed LTO oportunity

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Nov 13 09:26:38 PST 2011


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: unassignedbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu, tonic at nondot.org
    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.



More information about the llvm-bugs mailing list