[LLVMbugs] [Bug 3664] New: Struct return values inhibit tail call elimination

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Feb 24 18:52:20 PST 2009


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

           Summary: Struct return values inhibit tail call elimination
           Product: libraries
           Version: 2.4
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core LLVM classes
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: jon at ffconsultancy.com
                CC: llvmbugs at cs.uiuc.edu


A call in tail position is not tail call eliminated if the return type of the
function is a struct:

define fastcc { { i8*, i8* }*, i8*} @init({ { i8*, i8* }*, i8*}, i32) {
entry:
      %2 = tail call fastcc { { i8*, i8* }*, i8* } @init({ { i8*, i8*}*, i8*}
%0, i32 %1)
      ret { { i8*, i8* }*, i8*} %2
}

Both tail calls and multiple return values are desirable so this interaction is
unwanted. However, it is easily worked around by resorting to sret form.


-- 
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