[LLVMbugs] [Bug 19893] New: Inefficient code for getting the address of a locally defined function

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 29 14:26:00 PDT 2014


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

            Bug ID: 19893
           Summary: Inefficient code for getting the address of a locally
                    defined function
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu, wschmidt at linux.vnet.ibm.com
    Classification: Unclassified

Given

define void @foo()  {
  ret void
}
declare i32 @bar(i8*)
define  void @zed() {
  call i32 @bar(i8* bitcast (void ()* @foo to i8*))
  ret void
}

llvm produces a constant pool entry and a load to get the address of foo. It
could use

        addis 3, 2, foo at toc@ha
        addi 3, 3, foo at toc@l

-- 
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/20140529/1616c361/attachment.html>


More information about the llvm-bugs mailing list