[LLVMbugs] [Bug 10066] New: Greedy allocator fails to fold a memory operand when spilling

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 2 08:33:56 PDT 2011


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

           Summary: Greedy allocator fails to fold a memory operand when
                    spilling
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Register Allocator
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sergey.galanov at intel.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=6676)
 --> (http://llvm.org/bugs/attachment.cgi?id=6676)
LLVM IR source

Hi. 

The code produced for the test in attachment is worse with the greedy allocator
than it was with the linear scan allocator (note that the test is compiled with
-disable-fp-elim option).

The test is a pair of nested loops. The outer loop counter (in vreg17) is
spilled on x86 but despite being used only once (for decrementing) stack slot
is not folded into the instruction. This happens because vreg17 is first split
into two registers (vreg54 and vreg53). Physical register is allocated for the
first one and the second one is spilled, so at that point it is not possible to
fold the memory operand unless it is somehow known that the two registers
originated from a common one.

Seems that greedy allocator is too greedy at splitting the intervals :) This
might not be a problem for a RISC architecture but it is not very good for
CISC.

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