[LLVMbugs] [Bug 13049] New: reg2mem falsely claims to split entry block

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 7 13:29:51 PDT 2012


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

             Bug #: 13049
           Summary: reg2mem falsely claims to split entry block
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: liblit at acm.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The documentation for Reg2Mem, appearing at the top of "Reg2Mem.cpp", claims
that "To make later hacking easier, the entry block is split into two, such
that all introduced allocas and nothing else are in the entry block."

This is untrue.  The Reg2Mem pass does not split the entry block.  After this
pass completes, the entry block still contains operations other than alloca
(assuming any such operations were present in the entry block to begin with). 
Reg2Mem does place an easy-to-recognize instruction just after the last alloca:

    %"reg2mem alloca point" = bitcast i32 0 to i32

So one could use this to find a good post-alloca split point if desired.  But
the documentation claims Reg2Mem splits already.  It does not.  Either Reg2Mem
should be changed to split as claimed, or the documentation in "Reg2Mem.cpp"
should be modified to reflect what the code actually does.

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