[LLVMbugs] [Bug 6253] New: SimpleRegisterCoalescer fails to update live-in information

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Feb 6 09:08:24 PST 2010


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

           Summary: SimpleRegisterCoalescer fails to update live-in
                    information
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: code-cleanup
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: mwb.cde at googlemail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=4185)
 --> (http://llvm.org/bugs/attachment.cgi?id=4185)
Make SimpleRegisterCoalescer print live-in information

The register coalescer doesn't update variable live-in information
when replacing virtual registers with physical registers. This means
that live-in information after running SimpleRegisterCoalescer is not
complete and can't be relied on.

The effect is that register allocators used with
SimpleRegisterCoalescer have to recalculate live-in information from
the set of live intervals.  This increases compile-time unnecessarily,
since all physical registers have to be considered and not just those
which were changed by the register coalescer. This is already done
by RegAllocLinearScan as a side-effect of setting live-in values for
virtual registers, so this is not a problem if the standard
allocator is used.

Test case: 

- Apply the attached patch to make SimpleRegisterCoalescer print the
  block live-in variables at the start and end of the register
  coalescer pass.

- Run 
   llc -debug -regalloc=linearscan -march=x86 
  on
   test/CodeGen/Generic/2003-05-27/usefsubasbool.l

The coalescer replaces source reg1024 with xmm0 in instruction 36
(UCOMISDRRrr %reg1024, %reg1026, eflags) of block BB#1
(shortcirc_next.1), but xmm0 is defined in block BB#0 (entry) and xmm0
is not marked live into BB#1.


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