[LLVMbugs] [Bug 17919] New: LLVM should be able to replace a unnamed_addr wrapper function with the callee

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 13 15:05:20 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=17919

            Bug ID: 17919
           Summary: LLVM should be able to replace a unnamed_addr wrapper
                    function with the callee
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

given

define linkonce_odr void @foo() unnamed_addr {
  call void @bar()
  ret void
}

llvm has no issues inlining and deleting foo. If we use a pointer to foo on the
other hand, llvm is not able to replace it with bar.

Clang has a spacial case for this when a destructor in a base class is
identical to one in the derived class. With this optimization implemented in
llvm we could probably drop the special case from clang.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131113/ea5d0f0d/attachment.html>


More information about the llvm-bugs mailing list