[LLVMbugs] [Bug 4262] New: llvm-gcc should generate available_externally function bodies etc

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon May 25 09:45:54 PDT 2009


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

           Summary: llvm-gcc should generate available_externally function
                    bodies etc
           Product: tools
           Version: 2.2
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: clattner at apple.com
                CC: llvmbugs at cs.uiuc.edu


llvm-gcc currently doesn't inline this example at -O3 because it doesn't emit
the body of test as an available_externally symbol:

extern __inline__ int test() { return 4; }
int bar() { return test(); }

$ llvm-gcc t.c -std=c89 -O3 -o - -emit-llvm -S
define i32 @bar() nounwind {
entry:
        %0 = tail call i32 (...)* @test() nounwind              ; <i32>
[#uses=1]
        ret i32 %0
}

declare i32 @test(...)


Clang handles this right by emitting @test with a body and available_externally
linkage.


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