[LLVMbugs] [Bug 3495] New: LocalSpiller:: RewriteMBB does not propagate the information about AvailableSpills between MBBs
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Feb 6 00:36:30 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3495
Summary: LocalSpiller::RewriteMBB does not propagate the
information about AvailableSpills between MBBs
Product: libraries
Version: trunk
Platform: All
URL: http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-
February/019976.html
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Register Allocator
AssignedTo: unassignedbugs at nondot.org
ReportedBy: romixlev at yahoo.com
CC: llvmbugs at cs.uiuc.edu
LocalSpiller::RewriteMBB seems not to propagate the information
about e.g. Spills between MBBs.In many cases, where MBB B1 has only
one predecessor MBB B2, B1 could reuse the information about the
physical registers that are in the live-out set of B2. This could help
to e.g. eliminate some useless reloads from spill slots, if the value
is available on the required physical register already. For example,
in the example below, the marked "movl 12(%esp), %ecx" instruction
could be eliminated.
.LBB2_2: # bb31
movl 12(%esp), %ecx
movl 8(%esp), %eax
cmpl $0, up+28(%eax,%ecx,4)
je .LBB2_9 # bb569
.LBB2_3: # bb41 ; <--- bb31 is the only predecessor of bb41
movl 12(%esp), %ecx ; <--- This could be eliminated!!!
movl 4(%esp), %eax
cmpl $0, down(%eax,%ecx,4)
je .LBB2_9 # bb569
It is also worth mentioning, that currently reloads from spill slots
are not recorded in the Spills set using the addAvailable method, as
far as I can see. Wouldn't it make sense?
I have the feeling that these improvements are rather easy to achieve
and would not require too much changes to the LocalSpiller. Probably,
we just need to keep the live-out set of the MBB around after
rewriting it, so that its successors can use it in some cases as
initial value for the Spills set.
For more information and test-case files please see this mail-thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019976.html
--
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