[LLVMbugs] [Bug 3290] New: scalarrepl doesn' t promote alloca in 2008-03-24-BitField-And-Alloca.c

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jan 6 17:57:23 PST 2009


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

           Summary: scalarrepl doesn't promote alloca in 2008-03-24-
                    BitField-And-Alloca.c
           Product: libraries
           Version: 1.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: clattner at apple.com
                CC: llvmbugs at cs.uiuc.edu


This is split off from bug 3232, where we learned that diabling gcc's inliner
caused a perf regression in 2008-03-24-BitField-And-Alloca.c because scalarrepl
isn't promoting the allocas anymore.

This in turn is because of how the struct is being passed by value to a
function: due to the ABI lowering stuff in the front-end, it is passed as an
i64, so we get this code, which confuses scalarrepl:

        %struct.Key = type { { i32, i32 } }
...
        %iospec = alloca %struct.Key            ; <%struct.Key*> [#uses=3]
...
        %2 = bitcast %struct.Key* %iospec to i64*               ; <i64*>
[#uses=1]
        store i64 %key_token2, i64* %2, align 8

Perhaps scalarrepl can handle this the same way it handles memcpy.


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